The decision to appoint Peter Mandelson as envoy to the Trump administration has backfired spectacularly and could bring down the prime minister.