Add helper function to convert [sizeX sizeY] matrix into byte array
Add unit tests corresponding to new toByteArray() function
Update CreateImage example to use new toByteArray() function
Drop multi-channel requirement in CreateImage example
Merge pull request #1768 from sbesson/rebased/dev_4_4/11624_tobytearray

Add Matlab helper function to convert matrix into byte array (rebased onto dev_4_4)