Prepare for imminent new 3D Viewer version

The 3D Viewer is slated to become ImgLib1-agnostic. The functions we used
in TrakEM2 to triangulate ShapeLists therefore needs to be copied here.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>