A powerful earthquake in the Aceh province of Indonesia has killed scores of people and reduced buildings to rubble.