Add reopen object method

If a file is already open, and we need to open the file with different
open flags, we can use reopen method to avoid closing the file which
would take away all the locks we placed on the file.

This commit introduces reopen method and uses it if an FSAL provides it.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
state_test doesn't need to open a file in read-write mode.

This just gets details about an existing lock, if any. There is no need
to open a file in read-write mode here. RDONLY mode should be just fine.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Open files read-only for shared mode locking if FSAL has reopen method.

If a file is already opened in read-only mode, and needs to be opened in
read-write mode, the file needs to be closed and opened again.  Closing
a file loses all kinds of locks placed on the file. For this reason,
even for satisfying a read mode lock (shared lock), we open the file in
read-write mode.

If FSAL has reopen method, we can just open the file in read-only mode.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
pass correct buffer size to getpwnam and getpwuid

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Merge branch 'tp/rw-ibm_next_20-pLinux' into ibm_next_20_tmp
Merge branch 'tp/reopen' into ibm_next_20_tmp
Merge branch 'tp/getpw' into ibm_next_20_tmp