ancestors: prefetch method outside of the loop
15412bba5a68 is yet another example where this is worthwhile when it comes to
performance, we blindly do it for all 'lazyancestors' methods.
templater: fix handling of \-escapes in raw string literals
The backslash character should start escape sequences no matter if a string is
prefixed with 'r'. They are just not interpreted as escape sequences in raw
strings. revset.tokenize() handles them correctly, but templater didn't.
https://docs.python.org/2/reference/lexical_analysis.html#string-literals
templater: evaluate "query" argument passed to revset()
revset() had the same issue as
9452112c8eb0. It crashed by passing non-string
expression.