test: Split into multiple files, add engine tests.

The number of unittests requires it to split test.c - too much spagetticode.
Not sure though this is the best solution.