Added XMPP chat support and API rate statistics to ghost code base.