replace all lookups of restrict_superuser with optimized call

to a function that caches it for 5 seconds
Merge pull request #1408 from dimagi/cache-restrict-superusers

replace all lookups of restrict_superuser with optimized call