We now install the real precmd hook only in the first run of the precmd
hook. This ensures that our precmd and preexec hooks are run last,
unless something else uses this trick, which is unlikely, and at that
point, the user is on their own.
Also ensure that the integration script is run only once even if the
user tries to source it twice with setting of KITTY_SHELL_INTEGRATION
each time.