Fix application editing, and improve permission related performance on the graou management page, application management page, and the application browse page.

Signed-off-by: Tyler O'Meara <Tyler@TylerOMeara.com>