put scopes that query the db for capabilities into lambdas

so that they don't try to connect to the db during initialization

Change-Id: I91616c73b0881ffa0782a7d39be47abd51436d86
Reviewed-on: https://gerrit.instructure.com/29289
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Anthus Williams <awilliams@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>