[ticket/12259] Reduce the size of our test matrix

Only test MariaDB or PostgreSQL once on PHP 5.4. This reduces our build matrix
by 10 builds (over half).

http://tracker.phpbb.com/browse/PHPBB3-12259