client: invalidate kernel dentries one by one

Our trick to trim the whole dentry tree does not work for 3.18+ kernel.
The fix is iterate the session cap list and trim dentries one by one.

Fixes: #9997
Signed-off-by: Yan, Zheng <zyan@redhat.com>
Calling this at the end instead of calling _schedule_invalidate_dentry_callback for each cap we trimmed used to be an optimisation, right?  So now that the implementation of invalidate_kernel_cache iterates overall caps anyway, maybe we should just call _schedule_invalidate_dentry_callback for only the ones we trim