It will end up from full jid anyway and this fixes the cache lookup of the caps hash so it uses the right one.
Assign handlers to "self". Towards better handling of subscription and unsubscription. Minor fixes.
Segregate and atomize into classes.