Step 1 of rewrite with StateMonad

- StateMonad is used to not have to explicit pass around all state.
- The code is translated to a Ast, and is then translated to
  Instructions and then to llvm code. This should make it possible to
  perform optimizations in each step if necessary.
Step 2 with StateMonad, now feature complete