added helper function for sharing d3 output

This adds a new function to bkHelper - updateDocumentModelFromDOM -
that can be used by JavaScript plugin to update the display of an HTML
cell in order to share it.
Fixes typo and tutorial
Changed error text
More formatting fix plus some error checking
Merge pull request #739 from twosigma/issue-407

added helper function for sharing d3 output