Add valid method check for quota resources

ReservableResource and CountableResource comes down to
the method used to count the in-use
resources.  For ReservableResource, the count is based on the number of
database objects matching the project ID, whereas with
CountableResource, a counting function has to be specified; otherwise,
the classes are identical and designed to be used identically.indeed,
CountableResource extends ReservableResource and only overrides the
constructor.

This patch add some sanity-checking to limit_check() and
reserve() that ensure that they only work with the correct resource
type(s)

Change-Id: Ibec048a5d8c2c4a8685f5f3cc2076c64b39654a3
Partial-Bug: #1301532
Merge "Add valid method check for quota resources"