python: add thread lock around register
In the current implementation, sanlock_register shouldn't block, but we
should not take any chance, since blocking will hang all threads in the
caller process.
It is also easier to maintain when we decouple the implementation from
the python glue layer; we don't want to modify locking in the python
binding when we we modify the underlying library.
Signed-off-by: Nir Soffer <nsoffer@redhat.com>