codegen: the file gets closed on ostream's destruction.
codegen: fixed random crash on the emitter.

This was a bug waiting to happen...
parser: fixed some memory leaks.

- Scanner has to be allocated as a unique_ptr instead of using the stack.
Apparently on the Stack it would've been deallocated too often and too early.
- Deallocate the contents pointer with `free` instead of delete. The `contents`
pointer gets allocated with `malloc` so we should choose `free` to deallocate
it to avoid problems. Reported by Valgrind.
codegen: merged the Emitter and the Hoare classes.

Moreover, the `compile` function does not belong to any class anymore, it's a
global function (inside the namespace hoare). The rest of the library has been
updated accordingly.
Removed unused function.
test: updated the `test` script to the new -S output.