Add libtess.js

This PR adds [libtess.js](https://github.com/brendankenny/libtess.js). libtess.js is needed for polygon triangulation. It's copied into the repository (rather than using a git subtree or submodule or similar) because a few extra modifications are needed (notably 1db4750) compared to the upstream version.