Thermal hysteresis in spin-crossover compounds studied within the mechanoelastic model and its potential application to nanoparticles