tests/synctest: allow it to be built with debug symbols

And small fixes to make it run properly under GDB.

Signed-off-by: Cleber Rosa <crosa@redhat.com>