sanlock: add get_hosts api

Returns info about hosts in a lockspace.

Use this to display host status from the
command line: sanlock client gets -h 1

Signed-off-by: David Teigland <teigland@redhat.com>
sanlock: remove direct read_id and live_id

These have not been used and better alternatives now exist.

Signed-off-by: David Teigland <teigland@redhat.com>
sanlock: add read_resource_owners

New api to read the resource owners from disk.

Signed-off-by: David Teigland <teigland@redhat.com>
sanlock: add test_resource_owners

to test if a resource can be acquired.
It correlates the results of sanlock_get_hosts
and sanlock_read_resource_owners.

Signed-off-by: David Teigland <teigland@redhat.com>
sanlock: add flag SANLK_REQUEST_NEXT_LVER

To cause sanlock_request() to automatically request
the next lver so the caller does not need to specify
the next lver, which requires reading the current one.
This flag would produce unexpected/unwanted results
if used by multiple hosts targetting the same owner.

Signed-off-by: David Teigland <teigland@redhat.com>
sanlock: improve check of max_hosts and num_hosts

Signed-off-by: David Teigland <teigland@redhat.com>
sanlock: add a comment

explaining an odd behavior where acquire of a locked
resource somtimes fails quickly and other times fails
slowly.

Signed-off-by: David Teigland <teigland@redhat.com>
test: add another test program

Signed-off-by: David Teigland <teigland@redhat.com>