Braid group and topological phase transitions in nonequilibrium stochastic dynamics.