stmhal: Add Timer class: simple TIM control, incl callback on IRQ.

Simple but functional timer control.  More sophistication will
eventually be added, or for now just use direct register access :)

Also added pyb.freq() function to get MCU clock frequencies.