Add env packages our first patch yay

Modifies the database so environmental packages are stored in the database.

The initialize.sql file has been moved to be the first patch.
@antgonza the live database will need to be modified running the following sql statement:
```sql
UPDATE settings SET current_patch = '0.sql';
```
The reason is that initialize is now the patch 0.

This PR also reduces some code duplication on reseting the test database
I think you can use `IF EXISTS` and get rid of this try/except block, see this [link](http://www.postgresql.org/docs/8.2/static/sql-dropschema.html).