Add solution and tests for primeFactorization