Proxy generation as of doctrine/common#168 - DCOM-96
Adding fix and tests for DDC-1734
Cleaning up logic of the proxy factory by moving closure generation to own private methods