Add sem_unlink on Base.ack_delete()
Fix problem with semaphore when deleting a base.

When the kTBS has to delete a base, the instance of engine.base.Base becomes rdfrest.local._DeletedResource.
The function _mark_as_deleted() is called, removing any attributes of the former class.

In our case, the Base attribute `self.semaphore` on which we relied on to release the semaphore was removed.
To solve the problem, we create a `semaphore` variable in the Base.lock() scope so we can use it later as it
doesn't rely on `self` anymore.

Note that we still do a `self.semaphore = semaphore`, because it's easier for the method `ack_delete` to
unlink the semaphore with `self.semaphore.unlink()`.