Add Django Model backed XBlock state storage.

Memory state storage replaced by Django model so you don't lose
student state when the process reboots. Run `python manage.py syncdb` to use.

On edx-tim, we're using workbench to develop an app where part
of the state is stored in django-backed apps, and part of the state is in the
XBlock. Making edits to the code bounces the server causing XBlock state to be
lost. This is painful.

I created a `XBlockState` model so that we could take advantage of
Django model admin tools for state introspection.
`WorkbenchDjangoKeyValueStore` has replaced `WorkbenchMemoryKeyValueStore`. I
also introduced `ScenarioIdManager` which will create scenario-local IDs. Scope
IDs will now be of the format:

 `{scenario-description-slug}.{block_type}(.{slug}).d{def #}(.u{usage #})`

This feature abuses the fact that scenario loading for the most part simply
overwrites the same keys with the same values (and will ignore the student
state that's been created in the meanwhile). All the state that isn't student
state is being recreated every time the server bounces. An exception to this
are the children-scoped entries. Since that's an append-only operation,
preserving the children scope entries between server startups would just cause
it to grow longer and longer each time. So we kind of cheat and wipe all the
children scope entries at startup.

While `ScenarioIdManager` makes the ID generation more stable between starts,
your state can still get messed up if you have student state stored against a
scenario that you are actively editing. To help with this problem, "reset
state" buttons have been added to the block and index pages.

If you want to force workbench to reset all state when it restarts, you can set
`settings.WORKBENCH["reset_state_on_restart"] = True` or set an environment
variable `WORKBENCH_RESET_STATE_ON_RESTART=true` or start the server by saying
`env WORKBENCH_RESET_STATE_ON_RESTART=true python manage.py runserver`

* Instead of displaying global state inline with the block page, it's now a link
that will take you to the admin page filtering on the scenario.
* Logging is also in its own scrolling div so that it doesn't make the page
extremely long, and all Django database debug logging is filtered out of the
output.
* Scenario XML is now displayed on the block page.
* Database settings can be overridden by setting the environment variable
`WORKBENCH_DATABASES` to be a JSON representation of what you want
`settings.DATABASES` to be set to.

* Performance was ignored a consideration. It could probably be made performant
by being smarter about batch updates, but I didn't spend any time on it.
* Student state can get out of sync with definition/usage state if the scenarios
are being moved around, requiring manual reset.

*****
Much thanks to @nedbat for his guidance and debugging help.
Merge pull request #190 from edx/ormsbee/django_kvstore

Django Model backed XBlock state storage