Removed DEBUG_LEVEL declaration from header debug.h

Variables should never be declared in header files. I moved the declaration
from the header file to the main file, and simply defined an extern int in the
header. This will allow other files to see the (global) variable, and even to
modify it, without raising a linker error if there are additional source
files.
Rearranging the project structure to match typical C project structure.

In a typical C project, source code is limited to the .c files. The .h files
are used for global definitions that must be shared between different source
files. I've taken the source code from the .h files and moved it into
corresponding src/*.c files. I've then created a (much smaller) .h file that
contains only the function prototypes and structure definitions.

There are probably still a bunch of unnecessary #include statements in both
the .c and .h files, but this is a good start.