ghci: mitigate host/target word size mismatch in BCOByteArray serialization
This patch mitigates a severe host/target word size mismatch issue in
BCOByteArray serialization logic introduced since !12142, see added
note for detailed explanation.
(cherry picked from commit 90891962)
(cherry picked from commit 86059632)
(cherry picked from commit 30d12c46)