Merge branch 'dev'
Close file after MSD generator is exhausted
Added context management to MSDParser

* MSDParser is no longer a generator, but it provides an iterator interface
  that functions the same
* It also provides __enter__ and __exit__ for context management
* Tests have been altered to use the iterator directly, rather than calling
  the generator-specific (and Py3-incompatible) .next()
Backported context management in test cases