Extended presence support in MUC

Fixing a bug where adding both history_attrs and password would result in single node.
Adding a support for extended presence on room join. The resulting stanza looks like this:
```xml
<presence from='jid@xmpp/resource' to='room@muc/nick'>
  <x xmlns='http://jabber.org/protocol/muc'>
    <history %optional attrs% />
    <password>%optional%</password>
  </x>
  <extended_presence>
    <useful_data1>John</useful_data1>
    <useful_data2>Doe</useful_data2>
  </extended_presence>
</presence>
```
Application is responsible for creating extended presence XML.