[DCOM-96] Refactor ProxyGenerator, introduce AbstractProxyFactory

This PR does two things:

* ProxyGenerator is refactored to use lazy templating.
* AbstractProxyFactory is introduced to move more logic into Common