Made windowResize use addEventListener over window.onresize

With the current implementation, windowResize can only be used to add
an event listener not remove one. You can only remove all listeners by
setting ```window.onresize = null;```

This patch uses ```window.addEventListener(‘resize’, fun);``` instead so an
individual function can be removed when needed.

The basis for this is I'm trying to use nvd3 in a single page app, and would like to ensure event listeners are removed when I navigate to another page to avoid memory leaks.