helpers: serialize access to helper methods

C being goroutine safe in client tests context is convenient. This change
serializes all access to exported methods defined in helpers.go. We assume
that client testsi goroutines will only access these, and access them only
during test duration. Benchmark methods are left unchanged as locking might
have to much impact on them, plus callers are not expected to run them
concurrently.

To avoid re-entrancy issues, exported methods were duplicated in non-exported
ones. Only exported ones Lock, and are forbidden to call other exported methods.

I am aware this scheme is a bit brittle, but we have tests and a quick look at
the code convinced me this should work.
gocheck: there is no reason to embed the mutex
Merge pull request #1 from pmezard/serialize-access-to-c-helpers-interface

helpers: serialize access to helper methods