Simplify ApplicationContent.closest_match by moving the caching into app_reverse

Also, only cache (urlconf, prefix) instead of the model.