Move factor loop out of XS.xs and into factor.c
Do our own trial factoring