Switch tests to automoc

Required for Qt5 compatibility
Raises minimum CMake version to 2.8.6