Includes were moved from .h to .cpp

Includes moved from .h to .cpp, flag for mysql added to config.mk, unnecessary includes deleted.