Bugfix: added two-phase locking to avoid previous inconsistency; used absolute priority to avoid deadlocks.
"Bugfix": closing sockets in clients after crash or disconnection; closing server socket on program end for whatever reason.
Fixed!  Had to split a try block into two, as incrementLogins failed, and then database.getRecent didn't executed.  Now passes unit tests.
Removed noinspection comment.
Merge pull request #1 from dwarduk/tick-fixes

Tick fixes