stmhal, timer: Set freq from float; get timer source freq.

Timers now have the following new features:
- can init freq using floating point; eg tim.init(freq=0.1)
- tim.source_freq() added to get freq of timer clock source
- tim.freq() added to get/set freq
- print(tim) now prints freq
stmhal, timer: Improve accuracy of freq computation.
stmhal, timer: Fix timer.chanel so mode can be a keyword.