revamp of makefile and filestructure

Split all the source file into different directories
according to what program they belong to.

Also completely redid the makefile to make it more general
and faster. Although the gui version is not yet tested for
extra header files. The old makefile is now placed at:
doc/old_makefile
.gitignore: ignore all qt-moc files