Former White House communications director Anthony Scaramucci has accused Donald Trump of prioritising his legacy over Republican success and predicted tensions over the party's future leadership.