SERVER-13797 Remove more usages of Client::getContext

This change removes additional usages of Client::getContext and replaces
them with passing the database directly.
Merge remote-tracking branch 'upstream/master'