Fix a pile of coverity warnings in the unit tests

Most of these problems can only trigger when the tests fail, but it's
good hygiene to keep the code warning-free in any case.
Fix coverity warnings in benchmark tools.

Again, not harmful, but best to stay warning-free.
Whoops; fix compilation in bench.c
Remove spurious checks in evrpc.c error cases (coverity)

Coverity hates the case where you have a redundant NULL check after
using something.