pkg/libcoap: fix build AND tests: add one to ensure it does not break in the future

The only thing I see in your branch is that you apparently noticed the 'strict protoype' problem a while ago and did not fix it here ;-)