Separability and factoring polynomials