add convenience override for Calculator::operator()
restructure library to separate tests, library and executables

It wasn't clear before which parts of the code would end up in the
shared library, which were tests and which were application code.
Perform an initial split. We can re-visit this choice later.