Added experimental destructors/finalizers support.

This has exposed some underlying bugs on some pieces of generated code, so I've put it under an option temporarily.

Fixes #148.