Split DFA minimization into separate partition and minimize functions
for readability and maintenance reasons.