Optimizing routing performance with many routes

This change splits the 'sanitization' of a request URL into a separate
helper function and ensure that it only occurs once per request.
Sanitizing the request URL is responsible for about 60% of routing
execution time in today's routing code.

There's also an optimization applied to perform faster validation of the
virtual path portion of the URL.