Hazard viewer losses

Extend the hazard viewer so that it will render uniform hazard spectra curves

LP: https://bugs.launchpad.net/oq-platform/+bug/1281105

&&

This PR allows the hazard viewer application (in need of a new, more general name) to plot multiple loss curves to a D3.js chart in a dynamic way. https://bugs.launchpad.net/oq-platform/+bug/1283111
In a HTTPS environment the js must be taken from an HTTPS source (to avoid the "shield" issue), so just for the ```TILESTREAM_API_URL``` please use the schema agnostic notation:

```patch
-var TILESTREAM_API_URL = 'http://tilestream.openquake.org/api/v1/Tileset/';
+var TILESTREAM_API_URL = '//tilestream.openquake.org/api/v1/Tileset/';
```