Fix -fcheck-bounds for compareBytesArray and setByteArray
As discussed in !7133 (comment 403462) and !7133 (comment 403468).
@maerwald hit both issues while testing bytestring
with -fcheck-bounds
: https://github.com/haskell/bytestring/pull/471#issuecomment-1019357810 and https://github.com/haskell/bytestring/issues/473
(Thanks for implementing this flag, it's tremendously useful)