Fix NDData issues with units and uncertainties

Includes tests, and closes #2393
Ensure that members of NDData are new copies instead of references

In both _arithmetic and convert_unit_to the result ought to be independent of the input and it wasn't.
Closes #2394
Add workaround for creating bool array in numpy 1.5.1
Fix initialization of NDData by NDData

Closes #2406
Set flags of the result in convert_unit_to

Closes #2409
Ensure that the wcs attribute of the result of _arithmetic is a copy, not reference

Closes #2410
Fix slicing of a single element in an NDData with mask or flags

Closes #2170
Convert NDData to numpy masked array if mask is set

Closes #2414
Change internal representation of mask when mask is None to appropriate numpy constant

Closes #2417

Part of the fix that closes this issue accidentally ended up in 2f55aa2
Ensure correct handling of units in _arithmetic

Closes #2413
Document the multiply and divide methods of NDData
Restore an import that was dropped in rebasing
Cosmology doc update to reflect functional interface deprecation
Change log update
fix for doctest failure
coerce pytest args to str to fix assertion error in pytest
Changelog entries
Formatting/style changes suggested by @astrofrog
Typo fixing and text tweaking
Merge pull request #2507 from nhmc/cosmology_doc_update

Cosmology doc update after deprecating the functional interface