Fix codegen on x86-64 Part 1 of the changes being worked on in #3451 Makes x86emitter emit the x86-64 machine code you would expect it to Also adds some unit tests to verify that things are working