Introduce ghci command wrapper
Introduce ghci command wrapper, which can be used to cutomize ghci:
- process additional actions before/after the command
- handle particular exceptions in given ways
- logging stats
We also split the timing and printing part of timeIt
into different
functions.