More robust clock divisor generation

Try generating a divisor with both 12MHz and 60MHz system clock, take the result
with the smallest error.

Also remove the freq<0 logic. Since freq is an unsigned value, this can never be
true.
Merge pull request #1 from contradict/more_robust_clocks

More robust clock divisor generation