Add some indexes to HostCategory and Repository

This should help a bit the list_mirror/get_mirrors method
Add some indexes on repository and host_category
Add indexes on the foreign keys of the database
Update the upgrade script to add the indexes