Refactored a bit
Refactored a bit

collapsed two identical filters into one  cpp function (duplicate layer
and addtolayer)

cnr-isti-vclab/meshlabjs,cnr-isti-vclab/meshlabjs,cignoni/meshlabjs,cnr-isti-vclab/meshlabjs,cignoni/meshlabjs,cignoni/meshlabjs,cnr-isti-vclab/meshlabjs,cignoni/meshlabjs,cnr-isti-vclab/meshlabjs,cignoni/meshlabjs