Fixes proxy caching bug with debug toolbar

request.user.isAdmin() was being called on every request, setting
Vary:Cookie and preventing proxy caching.

Resolves Github issue #739 by changing the conditions for which the
debug toolbar is displayed, and reordering them to take advantage of
short-circuiting to only call request.user.isAdmin() when necessary.