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

Closes #1151.

The following is an incomplete draft. However, I wanted to request comments immediately, in case anything was severely wrong.

The doc should be updated to include:

- [x] How context-local objects in Flask are implemented

Will squash commits later.
I also don't like "by making the request context globally available". It's unclear if "the request context" is a useful notion. Maybe something like "put data related to the request in global scope".