Add a unit test for API root caching.

This adds a unit test to make sure that caching of uri_templates in the API root
takes into account the correct local site.

Testing done:
Ran all tests.
Before the djblets change, the new test failed. After, it succeeds.

Reviewed at http://reviews.reviewboard.org/r/4109/