Port libcommhistory to Qt5

This isn't fully functional without a QtContacts backend, and will require some changes as a result of how we decide to expose telepathy details from QContact in Qt5. Regardless, it can be merged now so we can begin porting other software, just with the contacts features being non-functional for now.