More robust factor_nc().

If factor_nc() can't factor an expression, it should just return it
unchanged, not throw AssertionError.

In order to get a factorized result that matches the unfactorized
input expression in some cases involving powers of a Mul, we now
call powsimp() in addition to factor(). Thus it becomes necessary
to call expand(power_exp=True) when checking the result.

Fixes issue 3602: AssertionError while factoring noncommutative symbols.
http://code.google.com/p/sympy/issues/detail?id=3602