JS: Detect degenerate polygons when doing collision detection

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Search 3D meshes for degenerate triangles at load time

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: Fix debug string depth test bug

This won't be found in the wild, but recent changes to overlay depth
testing broke the debug string.

Signed-off-by: Matt Chudleigh <matt.chudleigh@ausenco.com>
Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: ensure the trace level is accessed in a synchonized manner

Findbugs pointed out there was one path we weren't synchronized when accessing
the traceLevel.  Move the function next to those that add to the trace and rename
the method to be clearTrace().

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>
JS: update version to 2013-28

Signed-off-by: Harvey Harrison <harvey.harrison@ausenco.com>