Péchy Imre (1789-1864), Zágráb vármegye főispánja, a III. orosz hadtesthez beosztott hadseregbiztos, majd lőcsei kerületi főbiztos