Use the new permission check function in calendardisplay.php.
Fix for error report when attempting to use unset variables as array.
Switch to new permission check in readelements.php.
Use new permission check in elementdisplay.php.
Use new permissions check in formdisplay.php.
Cache permission check result.
Use new permission checks in entriesdisplay.php and formdisplaypages.php.
Fixing a bug related to locking the view or not

The user's scope was being incorrectly determined, since we weren't
intersecting view_form groups with the user's own groups on this line.
Removing ToDo notes

yes, those appear to be working as expected.
Removed unnecessary permission checks
Merge pull request #7 from jegelstaff/new-permissions

Actually using the new permissions checks.