MULE-6965 - fixing MuleMessage serialization code when payload is byte array
(cherry picked from commit edb17c6c616671d5f6ded4a5ae1c4bc06fceab4a)
(cherry picked from commit 02b830dfe67c750d46e08c9b0d531f68d36f39ac)
(cherry picked from commit cbde189be707cc8bbe475b8defc8aa50e79fa861)