A federal appeals court ruled Friday that the Forest Service’s policies permitting gold mining in rivers in national forests violated the Endangered Species Act.