A collision between two high-speed trains carrying hundreds of passengers in southern Spain has killed at least 21 people and injured more than 70, the emergency services said.