Implement new clientid function

Use new abstract_mem.h

This is a pretty big change, many of the major points are
discussed below.

Convert SETCLIENTID and SETCLIENTID_CONFIRM to new clientid.

Convert EXCHANGE_ID and CREATE_SESSION to new clientid. These functions
now more closely follow RFC 5661. They are not perfect, but pass a
signiificant number of pynfs tests.

Make clientid owner part of client id structure. This allows each
clientid record to have it's own owner.

Add valid_lease function for EXCHANGE_ID to use.

Remove some unused clientid constants and cid_client_name field.

Remove obsolete clientid parameter from nfs4_Check_Stateid.

Extract confirmed and unconfirmed reaping into function to save dupe code.

Make NFS4 and NFS41 LOCK, LOCKU, and LOCKT code more alike. Add grace
period checking to v4.1. Fix up lock/open owner confusion in v4.1 LOCKT.
Fix up reuse of lock owner that didn't have attached open owner (LOCK
reusing lock owner from LOCKT). And several cosmetic changes (including
putting variables unique to v4 LOCK together for easier diff between
v4 and v4.1 code.

Use new lease expiry for operations that use SEQUENCE or pass a stateid.
Lease is reserved early, and when the compound is complete, then the
reservation is released and the lease time updated. All v4.1 operations
use this since they start with a SEQUENCE op. For v4.0 operations, this
is used when the operation looks up a stateid.

Add new functions to manage leases.

reserve_lease_lock atomically checks if lease is valid, and if so
also reserves the lease to prevent expiry while the lease is in
use by an operation. It returns with cid_mutex held.

update_lease releases a lease reservation and also actually
performs the lease renewal.

update_lease_locked must be called holding cid_mutex.

These operations make sure that once a lease renewing operation
starts, no matter how long it takes to complete, the lease will
not expire, and at the end of the operation, the lease will be
renewed.

valid_lease_locked allows checking lease validity while already
holding cid_mutex.

Also add pointer to reserved clientid in compound_data_t.

Split client id hash table into confirmed and unconfirmed tables. We need
to be able to look up both confirmed and unconfirmed client ids. The
assumption is that for any clientid4 value there is at most one confirmed
client id and one unconfirmed client id. For a given long form client id,
there might be multiple unconfirmed client ids, but still only a single
confirmed client id. Also add function for generating new
setclientid_confirm values.

Add function to compute new clientid4 .The short form clientid4 can not
just be a hash of the long form client id. The spec outlines conditions
under which a different clientid4 must be issued. We also need to know
when clientid4 is from another instance of Ganesha, old or in cluster
environment from a different node. To this extent, a new clientid4 will
be computed using a 32 bit counter and ServerEpoch.

Add hash table for long form client id values.

Add reference counting to nfs_client_id_t. The reference counting is not
perfect. There are some uses of nfs_client_id_t for example in the
PNFS code that may not be properly refcounted.

Refcounting uses the new abstract_atomic.h

Memory allocation uses the new pools in abstract_mem.h

Hash Tables use the new HashTable_GetLatch capability to atomically
add entries to the hash table and be cleaner on delete.

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>

Conflicts:

	src/include/sal_data.h

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>

Conflicts:

	src/include/sal_functions.h

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>
Implement RELEASE_LOCKOWNER

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>

Conflicts:

	src/Protocols/NFS/nfs4_op_release_lockowner.c
Fix NFS v4.1 session replay cache

Instead of trying to copy result into cache, take advantage that most of the
result of a COMPOUND is kept in Mem_Alloc memory, so just make this memory
owned by the cache, and have nfs4_Compound_Free delay freeing the memory.

Based on pynfs tests, there is still work to be done on session replay,
but it no longer causes crashes and actually passes some session replay
tests.

Signed-off-by: Frank Filz <ffilzlnx@us.ibm.com>

Conflicts:

	src/Protocols/NFS/nfs4_Compound.c
	src/include/nfs_exports.h
	src/include/sal_data.h