Client quota checks. Part 2: server side changes.

Reviewed at https://reviews.apache.org/r/16629/