Fix resource management issues

This fixes #36. `HDF5File` is now the concrete type that was `PlainHDF5File`, and `JldFile` now contains `HDF5File` as a field. This makes some things more complicated (most of the code in jld.jl lines 172-201 wasn't necessary before) but some things simpler (`plain` functions aren't necessary, and `toclose` will always be true for most types). I'm not certain it's less code than if `RawHDF5File` and `PlainHDF5File` were separate types, it seems cleaner (but most of the additional code here is for the tests).

~~WIP because this still requires changes to MAT.~~ MAT is now ready to go.