Political wisdom says Ukraine has saved Boris Johnson’s skin – a global crisis so grave that it looks self-indulgent to question his leadership. But the really successful operation to rescue the prime minister started long before Russia’s war, and much closer to home