Use one query instead of two for quota_usages

The second query was unnecessary and not using a proper index. It
seemed to be contributing to a deadlock issue as well.

Change-Id: I1031451b25140d71380c8149d3c83827eec0d4a9
Closes-Bug: #1308715
Co-Authored-by: Chris Behrens <cbehrens@codestud.com>
(cherry picked from commit da1fa5dc93e6e64d397e8d00769e34828669e010)
Merge "Use one query instead of two for quota_usages" into stable/icehouse