[WIP] provenance plugin

Fixes #242.

- [x] add tests, fix style
- [x] get and address feedback

<!---
@huboard:{"order":270.0,"milestone_order":270,"custom_state":""}
-->

Much nicer to read now...  Also, I added a coverage test to the plugin javascript.