ui/viewer: Minor cleanups and consolidations

There's no need for one-line event handlers.
ui/viewer: Correct event handler return values

These handlers (well, really only the mouseup handler) were returning
false, thus stopping propagation of the events and breaking other
handlers, as discussed in #431.

Also incorporating a change in the button check, from

    e.which != 1

to

    e.which > 1

which seems to be necessary for IE8 support (see #436).

Fixes #431.