A 7.9 earthquake rocked Costa Rica's capital on Wednesday, prompting a tsunami warning for parts of the Pacific including Hawaii.