[DCOM-96] Refactor ProxyGenerator to lazy templating and introduce AbstractProxyFactory.