Modeling of development of localized plastic deformation and prefracture stage in mesovolumes of heterogeneous media