Persistence API,

This is a combination of 10 commits.
Enable widget instanciation from front-end.

Address @minrk 's review comments.

Make API that allows users to persist widget state easily.

Added support for view persistence

Started adding support for model persistence.

Half way there!

Finished persistence API.

Move persistence code into the widget framework.

Fin.

Bug fixes