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>
remove_user clears the hash entry

Since uid2grp_remove_user() also clears the needed hash entry, there is
no need to clear the entire hash table at the beginning.

Signed-off-by: Malahal Naineni <malahal@us.ibm.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>
Replace exit() by sys.exit()

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>