Add support for LISTEN/NOTIFY

This commit adds support for the PostgreSQL LISTEN/NOTIFY mechanism by
adding two new user-exposed interfaces:

  - ListenerConn is a low level interface which establishes a connection
    to a PostgreSQL server and only knows how to execute simple queries
    and wait for notifications.  This interface does not know how to
    reconnect, and does not maintain a list of the channels it is
    listening on.  Its use is discouraged.
  - Listener is the higher-level interface which uses ListenerConn
    underneath to provide a simpler to use interface, supporting
    automatic reconnection.  In order to do that, it also maintains a
    list of channels it is already listening on.

Significant contributions and ideas from Tommie Gannert.  Ideas and
valuable feedback from Kamil Kisiel, Maciek Sakrejda and Paul Hammond.