conn: Change a lot about how connections are handled

The basics are as follows:

   o  Only actually destroy a connection after the eventloop has finished
      running.

   o  Stop requesting reads from the connection as soon as we have
      decided we want to close the connection for any reason.

   o  Stop requesting sends to the connection as soon as we have sent
      everything in the outq, or there is a fatal error on the connection.

   o  Destroy the connection if we no longer want sends and the connection
      has been marked for close.

   o  Notify the connection user exactly once of a shutdown. Currently
      there is no built-in way for the user to know if they were the one
      who triggered the shutdown or not. However, this is accomplished
      in user.c and server.c by checking conn->priv is non-NULL in the
      shutdown callback and setting conn->priv to NULL before performing
      an "external" shutdown:

           built-in shutdown:
             - call shutdown callback:
                 - priv is non-NULL, delete structures

           external shutdown:
             - set priv to NULL
             - call shutdown
                 - call shutdown callback
                     - priv is NULL, do nothing
             - delete structures
Merge branch 'master' of github.com:atheme/tethys