Add service generation monitoring and optimizations based on the result

Optimizations:
------------------
Scoping of three services
Caching of action binding context.
Make input formatters lazy

About 50MB less of memory consumption when server is loaded.
Optimizations like this should have a comment explaining what it does and why. It won't be obvious why this is helpful in 6 months, let's not lose track of the knowledge.