Move the unregistration of the io_service to BoostVM::terminate()