dispatch: start profiling earlier
This makes it possible to profile extension loading and setup, which
takes a substantial fraction of overall execution time for fast
commands.
(99% of this commit is simply changes of indentation to reflect the
hoisting of the two calls to maybeprofile to a single one that
happens earlier.)
# no-check-commit