Periodic formatting cleanup

This is the semi-irregular comment and docs cleanup.

No functional changes should be here although some code is moved in a
small attempt to sort functions and get things where they need to be.

Change-Id: Ib4a3e2590c6fbd016c391acc7aef6421e91c0dca
Merge "Periodic formatting cleanup"
Merge remote-tracking branch 'm_src_repo/citrix-fixes' into build-temp