Fix bug initing history times; add lookup method

It turns out that ``isNaN(null) === false``.  In other words, null isn't
not a number.  So if we want to check that something *is* a number, we
need to do ``a !== null && !isNaN(a)``.  Fix a bug this produced in
history startup.

Add ``Event.prototype.getUserIdsSharingSessionsWith(userId, minTime)``,
which returns a list of user IDs for users who shared sessions with the
given userId at the given event for longer than minTime (default zero).
Add tests for this.