Fix #95: Don't trim parentheses in /away message.

This is questionable design - tries to outsmart users,
breaks least astonishment, etc. Having stuff show up
like ((this)) occasionally isn't *that* bad.
Fix #97: Make /part send the correct presence.

Two bugs:
 - xmpp.leaveRoom() uses a "nick" variable that isn't initialized
   in the local scope. This means the "unavailable" presence is
   addressed to whichever nick is in the global "nick" variable.

   Uncaught in testing because another scope bug in ui accidentally
   used global "nick" as an iteration variable. Ouch!
   The correct variable to use is xmpp.nick.current

   (Cleanup of global iteration variables will be a separate patch.)

 - xmpp.presence() automatically adds an x > history element, which
   is only appropriate when joining a room. This has now been moved to
   xmpp.joinRoom().
Addon to #97: Confine loop vars to local scope.
Fix #96 (for now): Show unknown users' messages.

There is some bug that occasionally causes users to not be in the roster
despite being logged in. Either ejabberd is not sending the presence,
or cadence is not processing it right.

To alleviate the worst effects of this bug, instead of silently dropping
messages from these invisible users, cadence will now handle them like
backlog messages from offline users: User is formatted without affiliation,
role or jid; just the nickname.

(PS: A little logic clean-up in the affected code block.)
Fix #98: Support spaces in nicks as per RFC 6122.

Turns out that I was coding to a long superseded standard,
and XMPP nicks (resource parts) do, in fact, allow spaces.

- /nick must not filter out spaces.
- /msg must allow backslash-escaped spaces in the nick.
- /msg shortcuts on user links must escape spaces with backslash.
Fix #99: escape room name in xmpp.msg
Fix #100: Allow joining unlisted rooms.

chat.join():
1. Check if room is in xmpp.room.available.
2. If not, do xmpp.discoverRooms() and check again.
   (necessary to find newly created public rooms by title.)
3. If not, attempt to query it directly with xmpp.joinExistingRoom().
   Add it to xmpp.room.available if so, and refresh the menu.

xmpp.discoverRooms() ensures the current room remains in the list,
even if it is hidden and unlisted.

xmpp.leaveRoom() also refreshes the room list, to purge hidden
rooms or rooms that were destroyed by leaving them.
Fix #30: Allow creating new, instant rooms.

/create <room> will create a new room by joining it,
then set its title accordingly.
Cleanup: use jidFromRoomNick, remove old comment.
Addon to #30: Handle room creation/conf errors.

Both the creation of a room and its configuration may fail.

The first case is treated by eventPresenceError (just like
joining a room the user is banned from); the second occurs
when a field that we wanted to set is not on the configuration form.
Small cleanup in xmpp:

- unify xmpp.room.target setting in .join*Room
- remove superfluous .up(); that just moves an internal pointer.
- more compact code in .presence
Amend #30: Quote reserved word 'var'.

JS reserves the name 'var' and proscribes its use for
object identifiers. This means it must be entered as
a string literal when used as a key in an object literal.

(Most browsers will accept this, but strict parsers like the
YUI compressor do not.)
Part 1/2 of #83: Show incoming server messages.

Server messages (with no local or resource part)
from the domain of the main service or the MUC service
are now displayed.
Fix #102: Don't connect twice.

This corrects an old problem and also protects against it in the future:

- ui.js only attaches the connect command to #fakeLoginForm:submit,
  not to the enter key in its text fields. This way, the command will not
  be executed twice.
- xmpp.newConnection() will explicitly disconnect before
  replacing the connection object. xmpp.disconnect() is safe
  to use regardless of connection status.
Regression in af283f74: missing a "this."
Fix #104: Print error for bad nickname.

When the server sends a <jid-malformed /> presence error,
it is presumably a nick error because we check rooms with <iq>
before attempting to join them.

So when such an error arrives, cancel the nick change and
any join attempt (in case the bad nick was set before joining)
and alert user to the invalid nickname.
Don't truncate messages so much.

Increase message length limit to 2048 characters; also
explicitly exempt messageAddInfo from truncating.
We were running into the length limit with the user list
in /who due to the lengthy HTML code.
Use xmpp.jidFromRoomNick in xmpp.iq.
Addon to #102: Remove connection on discconnect.

Attempting to disconnect a connection object that isn't properly
connected may cause errors. After disconnecting, the connection
object should be removed completely.
Addon to #30: Send configuration to the right room.

xmpp.configureRoom ignored the room parameter and simply
configured xmpp.room.current.