Fix compatibility with Python < 2.7

My change for handling alternate casing in svn:keywords only worked with Python
2.7 (prior versions don't have a `flags` argument to `re.sub()`).

This change makes it so we compile the regex first using re.IGNORECASE, and
then call the substitution method on the regex object.

Testing done: Ran tests under python 2.6

Reviewed at https://reviews.reviewboard.org/r/6207/
Merge branch 'release-1.7.x' into release-2.0.x