A powerful magnitude-6.8 earthquake in Morocco has killed more than 2,000 people as rescue teams race to find survivors.