Grain refinement mechanism of soft-magnetic alloys with nanocrystals embedded in amorphous matrix