travis: rewrite config file.

Uses CXXFLAGS -O2 instead of default flags to speed up self checking.

Testing is done with the following settings:

1) gcc    CXXFLAGS=-O2
2) gcc    CXXFLAGS=-O2  SRCDIR=build VERIFY=1
3) gcc    CXXFLAGS=-O2  MAKEFLAGS="HAVE_RULES=yes"
4) gcc    CXXFLAGS=-O2  SRCDIR=build VERIFY=1  MAKEFLAGS="HAVE_RULES=yes"
5) clang  CXXFLAGS=-O2
6) clang  CXXFLAGS=-O2  SRCDIR=build VERIFY=1
7) clang  CXXFLAGS=-O2  MAKEFLAGS="HAVE_RULES=yes"
8) clang  CXXFLAGS=-O2  SRCDIR=build VERIFY=1  MAKEFLAGS="HAVE_RULES=yes"

Changes made to before_install:
 * install libpcre3

Changes made to script:
* make and make test are now called separately
* cppcheck also checks "build" folder (created by SRCDIR=build) if existing.
* gui is built twice, one time with HAVE_RULES=yes as qmake argument and one time without it.
* a script has been added and run which returns false if cppcheck --showtime=top5 does not return 7 lines indicating that something is broken
* cppcheck now checks all C code in the repo (to find internal errors), but suppresses warning for the code we don't care about. On my system this only took 17 more seconds compared to checking cli, lib, gui, and build only.
* compile and run dmake, fail the build if makefile is outdated (when dmake changes it)
* check cfg folder with xmllint

Other:
* removed some functions in test dir that cppcheck reported to be unused.
* enabled 2 tests symboldatabase32 and checkComparisonOfBoolWithBool that were implemented but not actually called by the testrunner
* comment out some functions that were implemented but not called in the testrunner because they were broken (needed to do this so they are not complained about by --enable=style)