Make testing of BoostVM::portClosed() thread-safe

* So the optimization in sendToVMPort() is safe to perform.
* Also fixes {VM.getStream} after {VM.closeStream}