Add test for astropy/ccdproc#165
Fix test that was missing unit for a CCDData object
Add more detail to test for astropy/ccdproc#165
Add (very limited) check that metadata is dict-like
Add more detail to code comments
Add test that auto logging results in a valid FITS file

A test for astropy/ccdproc#166
Change test for case sensitivity to succeed if default header is case sensitive

In essence, a check for astropy/ccdproc#156
Add test that HISTORY is preserved when reading a FITS file

A test for astropy/ccdproc#163
Refactor metadata handling in CCDData

This closes several related issues that come up if a FITS header is converted to some other format (e.g. dict) and then converted back to a FITS header.

Closes #156
Closes #163
Closes #165
Closes #166
Update docs to reflect metadata changes
Merge pull request #167 from mwcraig/new-meta

Fix a number of metadata-related issues with CCDData class