Khitrovo, Sergei Petrovich, Russian general and senator