Use ctest to integrate unit tests into cmake build system

Unit tests can be run with 
    
    make test

Tests are run by travis as well, but I had to disable an assertion (related to #387) and friends_test (https://github.com/irungentoo/ProjectTox-Core/blob/master/auto_tests/friends_test.c) because they seem to be broken