UPGRADE-11. Tool for running check-in thread.

This commit adds a tool which launches a check-in thread and waits for
its completion. The tool installs a shutdown hook and writes a PID file
so an external process can shutdown the daemon.