Thermalization after inflation and production of massive stable particles