d3 plugins should fail gracefully if the d3 is not found on page.

The d3 plugins should avoid throwing JS errors on the page when d3 itself is not found on the page.

- Explicitly pass d3 into the plugin closure and check for object existence before initializing the plugin code.
- Adding plugin closures if they were not there.