Split executable from library
This splits the implementation from the main file. I.e. the hpc
executable is now only a small wrapper around the library which has been added in the cabal file.
This refactor is required to implement a testsuite for the implementation which can depend on the library.