primelib: add prime factorization