set resource to null when close an active chat.

I think it would be useful to set the resource of an closed chat explicitly to null. 
So when you send a new message to this contact and create a new active chat the message goes to barejid instead to the saved jid.