Add method to manager for shutdown
Do not try to unlock the processor if locking failed
Rewrite portion of flushing function

...to account for
 * EWOULDBLOCK
 * logging
 * need for closing down the connection through the connection manager
Merge pull request #642 from neithernut/add-connection-shutdown

Add connection shutdown through connection manager