Start using d3 3.1.0

Update d3, use streams, d3.set, clip
Use clipping, fix side effects
Fix tests and global leak
Merge pull request #931 from systemed/streams

Start using d3 3.1.0