Replace QDateTime::fromString with faster function

This patch to ContactsDatabase::fromDateTimeString led to more than 30% improvement in SeasideCache population time on my device.

P.S. let me know if you want me to squash the two commits. They are two different rewrites of the same function; the later one was a little bit faster.
These didn't make a difference... I guess the compiler was just smart :)
(the ::const_iterator approach had the problem that I still needed i for pattern[i])