Move CliApp and related classes to lib/

+1