fix some shared memory issues, client uses attach/detach, server uses create/remove shared memory implement CMD_RESET_SIMULATION
only allow server to create and initialize shared memory, client will report failure intercept signals to cleanup shared memory in standalone app, thanks to Roland Philippsen.