A couple in Germany have told a court they killed two Ukrainian refugees in order to steal a baby.