Former Nationals leader Barnaby Joyce has quit the party, citing fractured relationships with its leadership.