Add consistent formatting

The code is all formatted consistently using clang-format. The
.clang-format file in the top directory specifies the formatting style
to be used