Codegen: Cleanup

Clean up the code generator by introducing a LLVM DSL similar to Stephen
Diehl's llvm-codegen library.

Signed-off-by: Pekka Enberg <penberg@iki.fi>