Add atomic store and fetch for time_t

Signed-off-by: Frank S. Filz <ffilzlnx@mindspring.com>
NFSv4: Cache NFSv4 open stateids for the lease period after close

NFSv4 rfc states that -

 --->
 9.10.1. Close and Retention of State Information

 Since a CLOSE operation requests deallocation of a stateid, dealing
 with retransmission of the CLOSE, may pose special difficulties,
 since the state information, which normally would be used to
 determine the state of the open file being designated, might be
 deallocated, resulting in an NFS4ERR_BAD_STATEID error.
 Servers may deal with this problem in a number of ways. To provide
 the greatest degree assurance that the protocol is being used
 properly, a server should, rather than deallocate the stateid, mark
 it as close-pending, and retain the stateid with this status, until
 later deallocation. In this way, a retransmitted CLOSE can be
 recognized since the stateid points to state information with this
 distinctive status, so that it can be handled without error.
 When adopting this strategy, a server should retain the state
 information until the earliest of:

 o Another validly sequenced request for the same open-owner, that is not a retransmission.

 o The time that an open-owner is freed by the server due to period with no activity.

 o All locks for the client are freed as a result of a SETCLIENTID.
 <---

 So, to provide greater assurance and detect replayed CLOSE ops, we chose
 to extend stateid lifetime. Also retaining state_ids extend the life of
 open_owner as well. This will help us in reusing the same open_owner and avoid
 open_confirmation incase of reOPEN ops issued by the client within the lease period.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>

Additional work done by Frank Filz:

- Resolved merge conflicts

- Dealt with refcounting of state_t objects and need to use
  get_state_entry_ref to access state_entry.

- rename last_close to state_last_close

- Instead of introducing a new state_type, just use state_last_close being
  non-zero to indicate a CLOSE_PENDING state.

- Made significant changes to reap_expired_state_ids since we have to take
  a state_t ref after dropping the hash lock. We also need to get the cache
  inode LRU ref after dropping the hash lock.

- Remove special handling for close in nfs4_Check_Stateid since we no longer
  need it since the stateid hangs around long enough for replay detection.

- Use new atomic store and fetch for time_t to access state_last_close.

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