Add a method to get the Base semaphore name.
Change Base from self.semaphore to self._get_semaphore.

Update Base methods and unit tests accordingly.
Update Base lock timeout to use a global variable.

This allows us to use a small timeout value for unit tests.
Check that a resource still exists when using lock

This will prevent event like:
- two processes P1 and P2 are accessing the base B at the same time.
- process P1 deletes the base B.
- process P2 changes something in base B, putting unreachable information into
  the triple store.

Now we check that the resource is not empty before a process is changes something in a base. We raise an error if the resource is empty.