Widget persistence API

Instead of persisting widgets ourselves, this PR provides the tools to allow users to persist widget states however they want.

- [ ] Try it
- [ ] Include docs (IPEP?)
- [ ] Include examples
- [ ] Include tests

@ellisonbg @SylvainCorlay @jasongrout