Phase transformations and magnetic structure of nanocrystalline Fe-Pd and Co-Pt alloys studied by in situ neutron powder diffraction