Refactoring codegen cleanup

All statement nodes now have their own parsenode which simplifies
codgen considerably.