hg-core: add function timing information
This change makes use of the newly added logging infrastructure to trace the
execution time of some important calls.
This approach is very much complementary to using a profiler and will not
guard against out-of-order execution or other kinds of compiler optimizations.
That said, it is useful to get a rough high-level idea of where time is spent.
Differential Revision: https://phab.mercurial-scm.org/D8253