DCOM-96 compliance - proxy generation as of doctrine/common#168

Rebased/squashed/yaddayadda :)

@dbu thanks for waiting patiently and not merging the super-messed-up one :)