Wait for jit to exit the runloop in debug, quit, and savestates

Pretty sure this'll fix the savestate issues for real this time.  Or at least, I hope.

I avoided doing anything in the hot areas so this shouldn't affect performance.  It should actually quit faster usually, in fact.

Please accept hrydgard/native#49 first.

-[Unknown]