factor before using roots quadratic (replaces #2520)

closes #2520
closes #5292

```
>>> roots(x**2 - (1 + I)*x + I, x)
{1: 1, I: 1}
>>> roots(x**2 - (1 + I)*x + I, x)
{1: 1, I: 1}
>>> roots(x**2 - (1 + a)*x + a, x)
{1: 1, a: 1}
>>> p = x**2 - (1 + I)*x + I
>>> solution = roots(p, x)
>>> x1 = solution.iteritems().next()[0];x1
1
>>> Matrix(2,2,[1, 0, 0, I]).eigenvects()
[(1, 1, [Matrix([
[1],
[0]])]), (I, 1, [Matrix([
[0],
[1]])])]
>>> Matrix(2,2,[1, 0, 0, a]).eigenvects()
[(1, 1, [Matrix([
[1],
[0]])]), (a, 1, [Matrix([
[0],
[1]])])]
```