blk: update checksum calculation algorithm

- Update the checksum handling to handle BE systems.
- Improve the way the chk-sums are calculated.
- Adjust the checksum unittest to be endianess aware.

Initial version by @mdalecki