Add shutdown method to Environment

To allow an Environment to be cleaned up a shutdown method has been
added. The shutdown method shuts down each of the Environment's
Dispatchers, giving them a chance to tidy up any threads that they
created.

Fixes #85