Analysis of the Dynamics of Magnetic Core–Shell Nanoparticles and Self-Assembly of Crystalline Superstructures in Gradient Fields