Hazard viewer losses

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