mozart/mozart2 — pull request #219 by eregon (2014-09-20 21:45:35+00:00)
Title: Remove permanent BoostVM references

This fixes an invalid mutex access (invalid memory) due to the ASIO thread trying to interact with an already terminated VM. This happens because IO errors and events can happen during or after termination.
This solution fixes it by making postVMEvent always aware of the possibly terminated status of the VM (in which case the event is ignored).
All member functions of BoostVM are now only called by the VM thread, making it much more easy to reason about.