In 1866, in Congress' first major effort to regulate mining on federal lands, it provided for the protection of the vested rights" of possessors and owners" to the use of water for mining, agricultural, manufacturing or other purposes, to the extent that these rights derive from priority of possession and are recognized and acknowledged by the local customs, laws, and the decisions of court