Cleaned code and added some improvements.

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.
Merge remote-tracking branch 'origin/DAO_cleanup' into DAO_cleanup

Conflicts:
	src/library/dao/libraryhashdao.h