Well-Balanced Second-Order Finite Element Approximation of the Shallow Water Equations with Friction