Solutions 13,14; Fixed & finished 12

Twelve gave me some trouble: I built a monstrosity for grouping prime
factors and recombining them and then ended up replacing it with a much
simpler solution that walks the prime factors and builds a factor tree.