GIS.lab Web: support for caching legend images (closes #219)