tests: rework logging
tests: rework logging

Major rework of the way logging works: always print to stderr, add
new routines for raw printing, store the message from a failed test
in the test context and print it after the test, general code
reorganization.

Signed-off-by: Bartosz Golaszewski <108de5fbc428215dc26df4468b48691526611148@gmail.com>

brgl/libgpiod,brgl/libgpiod,brgl/libgpiod,brgl/libgpiod