Remove repeated slicing when finding python markers
Use the `pos` argument of re.search.

This cuts out a lot of slicing (once per python chunk rather than once per
token), which should speed up template rendering.

Also, this means that `^` in `re_tok` actually matches a start of line, rather
than the current tokenization progress, allowing the hack for `a if b else c`
to be removed.