Chemical study of intermediate-mass (IM) Class 0 protostars - CO depletion and N2H+ deuteration