Add .clang-format for automated formatting.

These settings seem to reflect the most consistent formatting across the
codebase, though some things could be a little off. The penalties and the
line length will probably need more adjustment at some point.