Merge remote-tracking branch 'origin/147-fix-esgf-search-failures'

* origin/147-fix-esgf-search-failures:
  Fix index out of bound with some ESGF searches
Move calculation of animation range into map.js

Also ensure animation state is reset if a layer is removed.
Merge branch '154-fix-animation' into next