[entropy.db.sqlite] migrate locking code to entropy.locks.ResourceLock

The new EntropySQLiteRepository uses ResourceLock, and gains support
for reentrancy, anti-deadlock safety measures (only for nested calls),
unification of memory and file repositories locking code (the semantics
was already the same).
[entropy.db.sqlite] move schema update code away from __init__