build: "core" helper library for unit tests

The "private" helper library contained only the private classes. But
when a private class needs a symbol from the public classes, there can
be some linking problems.

There is a simpler solution, have all the classes (public and private)
in a "core" helper library. When unit tests link to this core library,
they can use private symbols.