Magnetoelastic and thermoelastic shape memory effect in a Co-Ni single crystal