Cache the last revision of a collection

In a post, each call to check permission fires a call to
get collection's last revision id along with other revisions.
We can cache the result in a local cache, this will reduce the
number of function calls to UUID::create(), find(), canAnswer()

Change-Id: I51fe0b3333f598f3f1a1317eae100312cd26ab99
Merge "Cache the last revision of a collection"