Added code to auto-generate copy() method for all objects, for deep
copying.

This code has not been tested yet, but the compiler is working again.