Changing xrange to six.range for PY3 compatibility
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
Fix checksum tests on 32-bit systems.
Remove unnecessary np.array()
Allow mask to be set to anything that can be converted to a numpy bool array
Allow flags to be set with array-like in addition to array or FlagCollection
Convert mask and flags input to ndarray
Changelog entry
Use np.intp_t for indices