The Gauss-Bonnet theorem for Riemannian polyhedra