Ten people have been reported killed and dozens injured in the derailment of a train near the capital Rabat.