Non-commuting random evolutions, and an operator-valued Feynman-Kac formula