Fix Icebox curves plotting d3 function

Fixes https://bugs.launchpad.net/oq-platform/+bug/1387272

Plotting code was completely wrong. Now the output looks good:

![screenshot from 2014-12-04 11 52 36](https://cloud.githubusercontent.com/assets/1818657/5297130/17cc4884-7bac-11e4-9da6-e57bd24ac084.png)