Precompile the regex used on severy set_header call.

The regex was cached by the re module, but the overhead of looking it
up in the cache added up to almost 1% of the time in benchmark.py.
Add a test that covers creation and binding of UIModules and methods.
Create UIModule proxies on demand instead of in RequestHandler init.

It would be nice to do something similar for UI methods, but it's tricker
and they are less common (there are three UIModules defined by default
for every handler).