Started on some testing with jasmine

Just a few tests in TerrainImporter. Also did a little refactoring
because of the testing
A little experimenting in CollisionDetection

Nothing usable yet
Small fix in TerrainImporter

After some changing to get the tests to work, some errors appeared
Small fix in getMapTextureWms

A variable name had accidently been changed in commit #ff491105