Gatan DM3: make sure that parsed units match up with physical sizes

Fixes #12154.
Gatan DM3: add bounds checking and allow endian swapping for uint values

Fixes #12182.
Merge pull request #1079 from melissalinkert/gatan-fixes

Gatan metadata fixes