Entanglement between a quantum dot spin and a photon