Before 21 Lithuanian dukes signed a peace treaty with Galicia–Volhynia, what is an example of the war-related functions the group who made up the majority of the military-economic staff of the state performed?