CS-5818: Problem with links in emails of invitation from calendar

Fix description: re-use variable gatein.email.domain.url of KS project to config hostname in calendar email notification.
CS-5870: Problem in ChatBar when user name contains capital letter

Fix description: add function encodeUserName to bypass the limitation of sensitive username of Openfire