Quantum key distribution over atomic-ensemble quantum repeaters