SERVER-1891 Consolidate command authorization checking logic.

This reverts commit 2e2a6fdffdba369a0594962267e5bc7bb47a3f3a and also fixes the build break that the
original "Consolidate command authorization checking logic" patch introduced.