trailing spaces removal in mbed common code

Trimmed trailing white spaces in most of mbed common code.

Not touched by this pull request - mbed hal target code, exporters templates, net