Rework the db model to make the regex and version_url attributes of a package

This simplifies the DB model, its insertion, updates and delete.

Adjust UI and API accordingly