Corrected includes in Database templates

QCoreApplication was being included incorrectly and the case for the generated
database header file was wrong.