MRP-1588 ldlm: flock completion tests.

a set of flock tests which races reply completion for
new flock request/test flock/unlock with namespace cleanup
on eviction.

Signed-off-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
Change-Id: Iff0d7bee501a89dbb32be42c55561594ef94b4d7
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/1297
Tested-by: Jenkins
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
Tested-by: Alexander Lezhoev <alexander_lezhoev@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>
MRP-1588 ldlm: flock completion fixes

move checks for FAILED, DESTROYED flags under ldlm spinlock,
destroy flock atomically with the check it is not destroyed yet.

do not put the granted flock into the resource if this is
UNLOCK, TEST, or DEADLOCK'ed flock.

Signed-off-by: Vitaly Fertman <Vitaly_Fertman@xyratex.com>
Change-Id: I97fa040a26eda6c6728929d10b29c2316db663e3
Reviewed-on: http://es-gerrit.xyus.xyratex.com:8080/1298
Tested-by: Jenkins
Reviewed-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Reviewed-by: Andriy Skulysh <andriy_skulysh@xyratex.com>
Tested-by: Alexander Lezhoev <alexander_lezhoev@xyratex.com>
Reviewed-by: Vitaly Fertman <vitaly_fertman@xyratex.com>