Extract shared test harness code into a separate file
Move shared *.ts files into lib/ dir

The files in lib/ will be shared between different front-end clients,
starting with the CLI client (cli.ts)