[stm32][i2c] use some libopencm3 API functions

instead of direct register access.

The hope is that it makes it more readable and also easier to add new STM familiies...

Possible drawback with current libopencm3 version is however that these API functions are real functions (not static inline) and hence might incur some overhead.