D.C. Mayor Muriel E. Bowser and Ted Leonsis, owner of the Wizards and Capitals, said Wednesday they were finalizing a deal that — if approved by the D.C. Council — would keep the teams in downtown D.C. until 2050, ending the owner’s planned move to Virginia.