[libcommhistory] Use a private class for ContactListener

Since this is being used in a few places now, let's avoid all the terrible dependencies pulled in by the full header (and the potential ABI issues..)

I have a followup patch which changes all of libcommhistory to use qtcontacts-sqlite-extensions instead of the hardcoded functions in ContactListener, which gets rid of the last of those header dependencies.