Fixed potential concurrency issue
The problem was that we must increment the
unique ID of a unit (entry, raspberry) *ONLY*
in a critical section, not outside.
This is now done correctly in the Database.add
method as it supposed to be.