Added build system for tests

cpp files in tests folder will be picked up and compiled. I had two
design goals when implementing the build system.

1. We need a separate build folder, with gcov augmented files. Since
it is nice to be able to profile and look into coverage of test cases.

2. We should not build more than necessary. Each test should not
only link direct dependencies.