Cache permissions between checks

Rather than repeatedly call getFileStatus() to perform different
permission checks on the same file, this patch adds a Permissions object
that caches the results of getFileStatus() to serve multiple permission
checks without multiple RPCs.

Change-Id: I3891d20e19ca3ec5d80461d81650679747fbcb1c
Reviewed-on: http://gerrit.ent.cloudera.com:8080/2819
Reviewed-by: Henry Robinson <henry@cloudera.com>
Tested-by: jenkins