adb: fix endianness issues
Fixed missing endian swaps in several places both in package creation and package reading. Also made sure that the digest used for signature checking always comes out the same regardless of host byte order (previously the signature would only be compatible with the byte order it was created on and fail anywhere else).
Ref #10900 (closed)