Compiles a pattern to a PatternSpec.
a zero-terminated UTF-8 encoded string
a newly-allocated PatternSpec