Reformat using clang-format

* Add clang-format style file (.clang-format)
* Add script to format selected / all source files
* Commit result of running script on all source files.

The style file is not ideal, but it's pretty much the best clang-format
3.4 can cope with. Ideally, I'd like the opening brace for namespaces on
the same line as the namespace declaration, and a couple of other minor
things. Consequently, the style may change in future, which is why the
format.sh script is provided to easily reformat all of the source
according to any style definition changes.