cmap: Fix map functions returning objects + parallel processing
cmap: Fix map functions returning objects + parallel processing

When using parallel processing on map functions that returned objects,
"cmap" would fail. Fixed this by refactoring the code to be more "DRY".

onnodb/MATLAB-FunUtils