add friend function complete

Add friend:
Can send invitation, receive invitation.
After approve invitation will add the contact to contact list.

Fix bug:
1. Clear all the chat messages after page transition.