De Blasio is elected mayor of New York