Implement CAP related signals

This patch implements the CAP specification as per [1] and the code to dispatch the related signals.
[1]: http://ircv3.atheme.org/specification/capability-negotiation-3.1