[BUGFIX] Adjust to TYPO3 Flow CGL

This adjusts the code base to be more in sync with the Flow Coding
guidelines:
http://docs.typo3.org/flow/TYPO3FlowDocumentation/TheDefinitiveGuide⏎
/PartV/CodingGuideLines/PHP.html

While there are mostly cosmetic tweaks this also contains some
fixes to otherwise breaking code, thus the "BUGFIX" prefix.