Exit if server port is unavailable.

Modify main() to exit if an exception is thrown, e.g. when the server
port is unavailable.  Prior to this change, the server hung indefinitely
due to lingering service threads.
Reduce compiler warnings.