Von Seilern, Johann Friedrich, Baron, Imperial diplomatist