Tamás Erdődy — Hungarian count, imperial military general, Ban of Croatia