Refactor: scheduler: reduce code duplication when displaying resources
Refactor native_output_string() to use GString, for readability and
maintainability. Refactor common_print() to use it, to reduce duplication and
ensure displays are consistent.
This makes a couple small changes in how things are shown:
- If pe_print_dev is enabled (a debugging flag not actually used by anything), the additional resource fields are shown with the resource flags rather than their own parenthesized list.
- The new output model is now consistent with the legacy print model in displaying resource flags with commas (not spaces) between them.