sanlock: reuse resource structs
Keep unused resource structs on a list and reuse
them if the same resource is requested again.
This is meant to keep the resource id (rN) the
same instead of increasing for every request.
The limited number of unused saved structs means
that the same resource can get a new id between
requests. Internally, the token_id (unique for
each token/request) is replaced by the res_id.