Noncommutative linear system theory, formal power series in noncommuting indeterminants and applications