Tailoring Crystalline Phase and Surface of Lanthanide-Based Nanoparticles for MRI Applications