A powerful earthquake shakes Mexico City, triggering the capital's quake alarm system and causing buildings to sway.