Performance improvements to filtering.
Cache the results of regex tests on users.
(Cached results are only re-used when the user revision count is unchanged).
Avoid copying strings during regex tests.