Add support for freeing code emitter objects at the end of compilation.

Per https://github.com/micropython/micropython/pull/214#issuecomment-33176425 .