Track all permissions-related tasks

On disable, stop all tasks that haven't run to completion
Reformatted (again)
Slightly improved Functions javadoc