Set plugin_state to notify of intentional shutdown

This allows handlers to distinguish between involuntary connection loss
and connection loss due to logstash exiting.