Another attempt to improve core.when-interpreter-exceptions unit test.

lookup_hostname("localhost") occassionally timed out (after allowed 10
secs) when running test suite on some systems.  Not sure why, but
changed to use the Exec module for when block conditions instead as the
scope of the test doesn't depend on a particular type of condition, it
just needs something that will work reliably/quickly.
Merge remote-tracking branch 'origin/fastpath'

* origin/fastpath:
  Another attempt to improve core.when-interpreter-exceptions unit test.