A generalization of Coxeter groups, root systems, and Matsumoto’s theorem