What is the primary function of a load-holding (counterbalance) valve in a crane's hydraulic circuit?