Handle simulation mode changes better.

Use qemu facilitites for handling simulation mode and VCPU state
changes. This commit allows us to start working towards removing
the PTLsim queue that ordinarily needs to be checked before entering
execution loops.
Update current_cpu when cycling across cores.

Some MMIO accesses and other devices expect current_cpu to point
to the currently executing CPU. Make sure that we set it before
cycling on a core. Barrier might not be necessary?, but putting it
there for safety.
Update qemu ref.

Still not completely functional and stable, but getting there.