Nvd3 controls issue

Fixes #392, including following issues with nvd3 plots with controls
1. Adding controls creates html with indent, which pandoc interprets as preformatted code block.
2. ```<div id='...' class='rChart'>``` is generated twice: once by ```template$chartDiv``` and once from lib/controls/script.html.
3. Having multiple charts with controls doesn't work, as all angular controllers have the same name (DemoCtrl).