Implement removing gids cache entries.

The current code tries to update a gids cache entry with new
supplementary groups after manage_gids_expiration timeout (30 minutes by
default). The group_data structure is reference counted but is not
removed from the AVL trees. Thus a very active entry's refcount may
never go to zero. Due to a bug in the implementation, we actually free
the "groups" buffer while there may be active users.

This commit implements removing cache entry after expiration timeout.
This way, any new requests get reference on the newly created entry, and
eventually the removed entry's refcount should go to zero at which point
it gets freed.

Also "cache_info" now has a pointer to "group_data" rather than the
structure itself. This way, "cache_info" can be freed as soon as it gets
removed from the cache trees, and "group_data" gets freed when its
refcount goes to zero.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Verify the node we find in the hash array

Hash collisions are not handled. We simpley replace the old entry with
the new entry. So make sure that the node we find in the hash array is
in fact what we want.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Purge the gids cache via dbus interface

This dbus interface purges the entire gids cache altogether.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Rework get_req_uid_gid and nfs_check_anon into get_req_creds with proper managed_gids

These routines really needn't be separate, and by combining them, we can
properly use manage_gids feature. Some key points:

Only manage_gids once, and then remember the data until the end of the
request at which point we unref it.

If we must squash ids in the caller_garray, make a copy. Free that copy
at the end of the request (in the meantime, that one copy may be re-used
with different sqush parameters).

Cleaner handling of reverting to original creds by always fetching the
original creds into a saved creds struct and then copying bits out of it
into the working creds as needed.

Move all the creds management data and flags into req_op_context (don't
burden other users of struct user_creds).

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Remove nfs_creds.h from source files that don't need it

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Rename nfs_export_list.c nfs_creds.c and move declarations into nfs_creds.h

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>