Fix for netCDF4 reserved attribute names.

This PR fixes a problems arising from attributes whose names clash with attributes of the `netCDF4.Dataset` object. This replaces #1168.

The fixes are for both saving (as completed by @stephenpascoe) and for loading. The load fix introduces correct handling of global attributes. Tests are included.

Also note that the final commit is necessary to make the `cf` tests run. We've been missing out on these the whole time which is a bit worrying!
I guess this isn't wanted?