Merge just some endian / swap related fixes

This is just some cherry-picking and a few conflict resolves from #4716.  I also added something that might potentially be enough to make savestates work without disabling them on big endian.

-[Unknown]