Merged changes from codeplex

25592 cleaning up generated code
25566 initial version of optimization for curried function application
25564 Use GetEnumUnderlyingType instead of UnderlyingSystemType
25548 fixed TypeBuilderInstantiationType type name on Mono - initial
rev of generated enums