Add safety to struct state_t

In addition to refcounting state_t objects, we also need to protect access
to the other objects it references.

First, each state_t now also holds it's own refcount to the cache entry and
export it belongs to.

Second, a mutex is added to protect the state_entry, state_export, and
state_owner fields.

Third, inline functions are provided to safely take a reference to each
of these objects. This guards against use of a state_t object just after
it has been removed from the stateid table (which also disconnects it from
all of these objects). By taking an independent reference under the
state_mutex, we guarantee those objects will live long enough for the
caller to do what it needs to do.

Fourth, we protect against multiple calls to state_del/state_del_locked. If
we are unable to remove the state_t from the stateid table, then it must
have already been destroyed.

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Make lock_entry_inc_ref static inline and lock_entry_dec_ref static

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
Make sure state_nfs4_owner_unlock_all handles stale cache entry and export

And in general clean this up

Now, if we are unable to release all the owner's locks due to too many errors,
issue a LogFatal rather than having Ganesha continue with dangling pointers.

Also, just perform a single loop on lock owners belonging to the clientid.

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