cmake: bump version requirement to 2.8.9 to make use of CMAKE_POSITION_INDEPENDENT_CODE

CMAKE_POSITION_INDEPENDENT_CODE will tell the build system to
automatically use -fPIC / -fPIE when appropriate.
cmake: Drop completely the optional automoc dependency

Since we require cmake 2.8.9 now, there is no point.
cmake: Use CMAKE_INCLUDE_CURRENT_DIR

This avoids including CMAKE_CURRENT_BINARY_DIR in nearly every
subdirectory
cmake: Use the new CMakePackageConfigHelpers
qt5: Add conditional support for Qt5 in the build system

Based on patches by:
    Andoni Morales Alastruey <ylatuya@gmail.com>
    Luciana Fujii Pontello <luciana@fujii.eti.br>
qt5: Rename the libraries and the package when building with qt5

This is to keep the libraries co-installable with the qt4 versions
qt5: Fix QtGStreamerConfig*.cmake to use qt5 when appropriate
qt5: Initial port to Qt5

Based on patches by:
    Tiago Salem Herrmann <tiago.herrmann@canonical.com>
    Gustavo Pichorim Boiko <gustavo.boiko@canonical.com>
    Andoni Morales Alastruey <ylatuya@gmail.com>
    Luciana Fujii Pontello <luciana@fujii.eti.br>
qt5: objectstore: Fix refcount problem on Qt5 port

We should test if the value was already zero, and not try to unref it
and then test.
qt5: examples: Fix floating point exception in player

QTime() in QT5 is different than QTime(0,0). The first won't produce a
valid date, and can't be used in QTime.msecsTo and other methods that
rely on a valid QTime, otherwise 0 will be returned.
qt5: qtvideosink: Fix replacement of windowShown

qWaitForWindowShown has been deprecated in favor of
qWaitForWindowExposed and not qWaitForWindowActive.
cmake: Fix library variable
qt5: also port the qmlplayer example
qt5: Fix the export macros to work with the Qt5* library names
qt5: Set QT_IMPORTS_DIR on qt5
tests/compilation: Fix the compilation tests to work without FindQtGStreamer.cmake
tests/compilation: don't link compilation tests with qtcore

This fails with Qt5 because qtcore is imported as an external
cmake target, which apparently doesn't work with try_compile().
Fortunately, we are not using QtCore in those tests.
tests/compilation: Pass the cmake generator to the compilation tests

This is useful on windows, where the default generator
is most likely not what we want
tests/compilation: Pass the TARGET_LINKER_FILE to the compilation tests

On linux it doesn't matter, but on windows the linker is picky.
TARGET_FILE expands to the .dll, which is useless for the linker;
it requires the .lib/.a file instead.
cmake: Improve installation dirs macros

* Use GNUInstallDirs as a base
* Install .dlls in $prefix/bin on windows
* Install cmake config files in lib/cmake/<package>
* Rename macros for readability