Fix to user names after non-messages

Before, a change was made that made timestamps show up correctly when non-chat
messages were entered before the chat was. As an unintended side-effect, the
user names were not being displayed after a non-chat message if that user spoke
before it, which made for some odd dialog.

To be more structured, all message appending was separated to a single function
regardless of message. There it is checked to see whether a new date header is
necessary or not. Now we have accurate date headers and user names appearing
when they should be.

Note that while no prepending code was touched, as it is not affected, it might
be something to refactor later.
Fix a scrolling bug reproducible in Chrome stable

When a scrollable element is hidden and re-shown, as tabs are in the case of
JabbR, it appears that the internal position is maintained, but upon attempting
to scroll, the scroll bar will jump to the top. In JabbR, scrollToBottom is
always called when tabs are changed; however, when the scrollTop is set to its
current value, nothing changes internally. This means that if the user was at
the bottom of the scroll when switching tabs, upon switching back and scrolling
down, the chat will jump to the top.

Additionally, the scrollTop value was set to the scrollHeight of the element,
which is not the proper scrollTop, since you must subtract the height of the
actual element itself. This is normally not a problem, since the browser will
create an upper bound, but in this fix, subtracting 1 will still make it bounded
by the correct value and thus not actually change the scroll value which is
necessary to workaround the bug.
Merge pull request #552 from dpatti/name-fix

Fix to user names after non-messages
Merge pull request #555 from dpatti/scroll-fix

Fix a scrolling bug reproducible in Chrome stable
Improve the automatic scrolling for rich content

Three notable instances were corrected here:

* When someone enters an image link, once that image loads the window may scroll
  up past the bottom edge of the screen.
* When you join a room with images, as they load they will push the scroll up.
* When you paste content, it is later replaced with the full version from the
  server, which causes chat to be scrolled up.

The latter of the three was the most simple case, and it involved simply placing
the ui.replaceMessage() function into the scrollIfNecessary wrapper.

In the case of the images, there was already a system in place to force scroll
after 850ms in the case of a new message; however, this was not working since it
required you to already be at the end of the chat scroll. A new method was added
that can be called to attach load event handlers to elements within those
messages which will correct the scroll position only if the user himself has not
touched it in the meantime.

Deciding which elements to attach the load event handler to is done in the
utility function expandableContent(), which uses a hard-coded list of selectors
to search for within the messages provided. Most rich content in JabbR has
hard-coded dimensions, but the one exception that I found in my testing was
images for obvious reasons. If there are more, they can be easily added to the
array. At the very least, the functionality will not regress as it was never
working in the first place.
Minor fix to click-to-message functionality

When the .trim() was added to the message, I did not consider that a space is
added initially when you click a name. The only functionality this fixes is if
you click a name and then try to click another without typing anything. While it
isn't a big deal, it's also not a big fix.
Merge pull request #557 from dpatti/click-name-fix

Minor fix to click-to-message functionality
Merge pull request #556 from dpatti/rich-scroll-fix

Improve the automatic scrolling for rich content
Added unbind of triggered event when handling scrolling for images.
Do not load messages if your scrollbar is at the end
Change expandable content selector to skip gravatars

This change will cut down on the amount of onload events fired, since gravatars
do not influence page scroll at all.
Delay the scroll watching events until after the deferred callback

When you are joining a room (not on refresh), after the room is populated, a
message is appended noting when you joined the room, and an optional room
welcome message is displayed. These will change the scroll value, which makes
all the onload watch calls fail.
Merge pull request #559 from dpatti/various-scroll-fixes

Various scroll fixes
removed fork me on github; added release tag section to web.config and bottom corner of site
adding azure release bits for setting commit details
Disable JS / CSS minification when building in debug mode
via @dpatti - "I keep making this change locally, since it is nearly impossible to debug
JavaScript when it is minified. By not calling ForceRelease(), SquishIt will
only minify when a release is built."
Merge pull request #563 from davidfowl/release-tag

adding azure release bits for setting commit details
Don't add a date header in rooms without chat
Merge pull request #564 from dpatti/no-chat-date

Don't add a date header in rooms without chat
Fix scrollToBottom when a horizontal scrollbar is present

Because the scrollHeight - height calculations do not give the actual max scroll
value, we have reverted to using just scrollHeight, which is an obvious
overshoot. That said, the only reason it was changed originally was so that the
scroll fix for chrome could offset it by 1 and then back again, but this can be
worked around by setting it to 0. Because the browser won't repaint immediately,
no stutter should be visible.