[contactsd] Build with either Qt4 or Qt5

Tests are not working correctly in either case, and are only
partially ported.
Merge pull request #6 from matthewvogt/qt5

[contactsd] Build with either Qt4 or Qt5