Towards a spin-ensemble quantum memory for superconducting qubits