Fixed EZP-20899: FieldDefinition appears unsorted while they should be ordered by placement + Implemented EZP-20851: Setup Travis tests to also test prostgres for ezpublish-kernel & -legacy

Fixing: https://jira.ez.no/browse/EZP-20899
Implementing: https://jira.ez.no/browse/EZP-20851

Also fixes some issues preventing the tests suites to run with PostgreSQL and uniformizing SQL queries to better catch differences.