HH-37938 fix some tornado3 incompatibilities and bugs
HH-37938 move handler.py methods around
HH-37938 add before, after and template postprocessors