Prepare deployment trends graph for module page

This commit adds the needed front and back end code to create
the deployment trends graph on the module page. This includes
changes to the backend in terms of data being sent to the template.
We need to extract the jinja from the javascript here, and then make this less gross