Created CodeEmitter to handle instruction building and frame measuring.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>