pw_ide: Reorg cpp.py
pw_ide: Reorg cpp.py

No functional changes, just moving things around to improve readability.
This change was extracted from the previous one to make the previous one
easier to review.

Change-Id: I90da2278937e6859864038531fba5cf4c8b44b7b
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/113911
Commit-Queue: Chad Norvell <f2b1b54074a2cea3f685a7cf4fc055999c2f0cd6@google.com>
Reviewed-by: Anthony DiGirolamo <4cc40125edc24ec5bc72df7917ea0b403ee8cebe@google.com>

google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed