daemon: fix add_lockspace that has been removed
If rem_lockspace happens
- after the lease_thread from add_lockspace has
acquired the lease, and
- before the space struct is moved to spaces list
then the struct space is freed, which leaves the
lease_thread using a freed struct space. The next
time the lease_thread tries to renew, it will
probably complain about bad info in struct space
and/or segfault.
rem_lockspace also needs to check for the lockspace
on the spaces_add list, otherwise it will return
immediately, before the remove, if the lockspace
is being added.
Signed-off-by: David Teigland <teigland@redhat.com>