introduce unittests

start with some unittests for raw bitsets.
remove strange+unused (r)bitset_copy_into
cleanup, use C99
Fixed bug in libcore: lc_evpprintf reports wrong string length
make printfs return the number of written bytes

This also fixes the return value of snprintf variants in case of full
buffer: The number of bytes that would have been written with an
infinite buffer is returned.
add an snprintf unittest