WWE and Endeavor Group have agreed to create a new global sports and entertainment company combining UFC and wrestling.