Make sure that cache is cleared in every case.

The cache was not cleared in two cases:
  1. When mocha.run threw an exception.
  1. When mocha asynchronously threw an uncaught exception. (Happens for some syntax errors in tests / test subjects.)

This patch uses node domains to handle both issues in a single spot.