Headers crossusing refactoting

All types and constants are removed from freeserf.h
Now we can clearly see how modules are using each other.
I agree that some of the includes can be cleaned up, but stdlib.h defines NULL which appears to be used below.