* Fix save/load states in Emscripten build
* Simplified Emscripten integration points
* Moved standalone JS functions to be static member functions of running_machine
* Improved Emscripten main loop
* Use convenience functions for cleaner code
As an added bonus, this now allows for proper shutdown of the running machine when running in the Emscripten environment - previously, attempts to exit the program were just being ignored.