Revise available/active capabilities handling

Make sure IrcNetwork::available/activeCapabilitiesChanged() signals get
emitted when appropriate.