Make the database import tool concurrency safe

In !136 (merged) we have introduced a tool to import metadata from a registry filesystem into the registry metadata database.

This tool isn't concurrency safe currently. This means that we can't walk the filesystem in parallel when scanning repositories. Mixing a concurrent storage walk with concurrent database transactions is notoriously difficult, especially as we intend to record and maintain the repositories hierarchical relationship.

We need to investigate the possibility of making the import process concurrency safe.

Edited by João Pereira