Fix nbviewer issue.

To fix the non-plots issues in nbviewer and nbconvert, I delayed the load of plot_js until the html is ready (the browser has loaded the HTML elements into the DOM). It works with nbconvert exported bokeh notebooks and does not seem to affect files or server plots.

This PR would close #559.