Add a simple but efficient lock contextmanager

To be merged after PR #30.

To use:
```python
from smartdispatch.utils import open_and_lock
with open_and_lock("/tmp/test.txt", 'w') ad f:
    f.write("Exclusive writing. Awesome!")
```
Is this part to make it work with the with statement ?