Minor formatting improvements in GUI2.

These improvements are done in preparation to use clang format on the gui
directory.
Use clang-format on the gui directory.

Most of the formatting has been done automatically, but some minor manual
polishing has been applied afterwards.

Also add .clang-format file containing the settings used for the
formatting.