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.