Dao cleanup

Added usage of nice macro LOG_FAILED_QUERY(query) instead of qDebug'ing
lastErrors.
In libraryscanner.cpp avoid #ifdefs by using Qt's
QDir::toNativeSeparators.
Changed postfix increment to prefix.
Added const to functions signatures.