Building long wall segments cost stone, and upgrading them gates costs even more stone. In reality gate doors are //not// made of stone. This patch therefore changes the upgrade cost to a 2:1 combination of wood and metal, and tweaks the cost of gateswood instead.
Moreover, D2611/rP23713 made long, medium, short wall cost (36, 24, 12) proportional to their health (3000, 2000, 1000). Since gates are in between long and medium segments (2500 health), so should their total cost (30).
The <Cost> component of gates is necessary for repairs; the value is less than the combined costs of building a long wall segment and subsequently upgrading it to a gate.
See also D2611, but this patch makes it proportional to its health.