Fix createMask.m
Fix createMask byte conversion for non multiple of 8
Add examples of mask creation to the training ROIs function
Define mask size using pixels dimensions
Fix createMask unit tests
Add createMask unit tests for numeric types and non-square arrays
Merge pull request #2958 from sbesson/rebased/dev_5_0/fix_matlab_binary_mask_creation

Fix createMask.m (rebased onto dev_5_0)