A powerful magnitude 6.4 earthquake jolted the northern coast of California before dawn on Tuesday, damaging homes, roads and water systems and leaving tens of thousands of people without electricity.