Clean up Visv. weighting functions
Add amd support and support for using command api in the browser
Add hidden -flatten command for testing
v0.2.2 updates the Visvalingam weighting function