Add test files

This is my proposal for the testing setup.

My Idea is that each module gets its own testing. No global test executable
to execute. Instead, we have a common testing helper source (tests.h), which
provides some utilities (by now just a macro for generating the main()
function) and each subdir in `tests/check/` is meant to produce an own
executeable test.

This way, we would have a much better testing setup and one could run only
the appropriate tests while developing.

I consider this setup as really clean. It is _inspired_ by the testing
setup of the gstreamer project, which also uses check.
Of course each test executable has it's own name, but that's not my point.
Moving the code to a function on it's own keeps the macro short (like, 3 lines), which is always a good thing.