Added IDisposable implementations.

Added IDisposable implementations on all classes that have a Release or Close method.