Last minute patches, part 3

Fixes invalid CAP data
Removes an API function
Adds debug to WHO so we can possibly figure out the culprit there
Adds part reason to "X is leaving the channel" messages in channel logs