Fixed database tests.
Updated some plugin to use the new threshold format
Added PostgreSQL tests