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
It's a useful discussion to have. After completing *The request context* section above, it seemed the right way to introduce the application context was by dividing the runtime state. Is the argument that this the wrong section to write?