Add pkg `posix_ipc` as a requirement
Add first implementation of secure Base.delete()

Also, add corresponding unit tests.
Add (non-tested) Base:edit,post_graph with locking
Add delete() and edit() with locking to InBase

The method post_graph as not been added to InBase yet.
This is because I think it won't be used by StoredTrace.
In fact, StoredTrace provide a post_graph() via mixins:GraphPostableMixins.
If I am correct it will override the one we could provide in InBase.
Add a nosetest showing concurrency problem

When calling base.create_model() we have the following call stack:

```
-> base.create_model()
  -> base.post_graph() ** Gets a semaphore for BASE, bringing semaphore value to 0
    -> mixins.post_graph()
      -> base.ack_post()
        -> base.edit() ** Gets a semaphore for BASE, waiting for upper semaphore to release
```

We see that a semaphore for BASE is needed multiple times in these encapsulated call. Making it impossible to proceed.
Put get_lock() as Base methode, rename it to lock.

Also change the unit test accordinhly.
Improve Base.lock() by providing info on BusyError
Fix deadlock when using lock() down the call stack

Previously, if a process needed to call lock() inside locked context it will result in a deadlock. (c.f. comment on commit 19f402a5f).
This commit fixes the deadlock problem by allowing a re-entering thread to not need to acquire the lock.
Add base.lock() inside StoredTrace.post_graph
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()`.
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.
Add more unit tests for Base locking, refactoring.
Fix wrong thread id when raising BusyError
Small comestic fix when checking resource in lock
Unit tests: clean up Base lock, add Model lock
Small fix for badly reporting blocking thread id