Rewrite docs for context locals, request contexts, and app contexts

Closes #1151.

The following is an incomplete draft. However, I wanted to get comments immediately, in any case anything was severely wrong.

The doc should be updated to include:

- [ ] How context-local objects in Flask are implemented
Not sure we need a extra chapter for the runtime state. There's no chapter for the application context though.