Vortex structure in magnetic nanodots: Dipolar interaction, mobile spin model, phase transition and melting