Add mock to requirements
Rewrite tags plugin using Jinja2 context manager
Overhaul paginate to use context processor

This also adds a basic test for paginate to make sure it's not erroring
out in obvious ways.