Fix HashMap to handle null keys.
Reimplement thread management/shutdown and start worker threads by default. See #419.