LOS ANGELES — A powerful earthquake just southeast of Tijuana shook southern California on Sunday afternoon, damaging buildings in border towns and rattling a seismically-sophisticated population as far north as Los Angeles, Phoenix and Las Vegas.