Migrate from sqlite to postgresql. Fix specs related to this change

I changed the gem file to include the pg gem for all the environments. I also updated the database.yml config file according to this migration and fixed specs that were relaying on specific ids generated by the database.
This is part of the task. Then, we'll need to migrate the data in staging and production. After that, I'll update the installation notes according to this.