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.
SERVER-1891 Add hook for auditing access control checks for commands.
SERVER-10026 collection scan
SERVER-10242 Make uassertStatusOK() an inline function instead of a macro.
SERVER-6246 Forbid direct inserts and updates to system.users collections when auth is enabled