Add a shutdown hook that prints all live threads, which is useful in a production environment
Simplified shutdown hook

areduce was reducing to a value, which is not what you need. The seq
abstraction makes iteration easy.

Also moved the let statement, getting the list of threads at the time of
shutdown.
Added more tests around cache