Javascript and unittest fixes

This pull request fixes #436 by creating a new Javascript utility file that implements the string methods ``contains`` and ``startsWith`` that were broken after an OpenLayers upgrade. Additionally, it replaces uses of these methods in Javascript files.

Finally, unittests were failing due to 2 minor issues and were fixed:
1. Float comparisons now use ``assertAlmostEqual`` instead of ``assertEqual``
2. Template tests were failing due to some changes in html by designers, these were modified