Quantum automata, braid group and link polynomials