Codeclean

Continuing the "codeclean" branch with some helpful standards applied across mostly stale code lines. Review the changes for the kind of spacing and basic changes being applied.

Some of these changes - such as including compiler directives in the cascade - are specifically to make it easier to work with editors that do naive code-folding, such as Textmate and Sublime. But they also make the code easier to read.

With modern editors and displays being wider than tall, we now tend to favor longer lines and less extraneous space between lines. Most C++ standards like the opening brace of methods on their own line, but other opening braces at the end of the line. I have favored placing all opening braces at the end of the line, as this again makes code-folding better to work with.

Where the case is simple and obvious I have made liberal use of the ternary operator.

The most large-scale change is to the dogm lcd implementation. Methods containing redundant code were replaced with macros which call methods taking extra flags, for some reduction in code size.