Refactor base/entrypoint.sh to add support for a fix-mirror command
This changes also the way the (storage) database is initialized: it now
checks whether the db exists and is initilized before attempting to
execute the swh db init tool.
The added fix_storage_for_mirror shell function executes a small sql
script that remove any constraint that can prevent the mirror storage
from working.