Add basis of grouped thread factory and make the scheduler use it.
Override context specific permission check