mds: dynamically adjust priority of committing dirfrags

Adjust priority of committing dirfrags according to number of
expiring log segments. The more expiring log segments, the higher
priority. Because it mean MDS does not trim log segments quickly
enough.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Merge pull request #1683 from ceph/wip-mds-op-prio

mds: dynamically adjust priority of committing dirfrags

Reviewed-by: Greg Farnum <greg@inktank.com>