Trends and Forecast pages now work with widgets.
Widgets can be dragged onto a dashboard page creating a copy of that
widget in that dashboard.

Added a constructor in the Widget object to take both the id and typeid.

Some styling fixes

Moved widget functionality to widget.js as opposed to dashboard.js