Clarified behavior for calls to shutdown methods while already shutting down or not connected. Added tests for clarified behavior.