Spin-valve photodiode