introduce nested contexts and integrate with Django

* Support registering nested contexts
* Provide basic Django middleware for tracking requests