gtopt/json/json_capacity_profile.hpp file

JSON serialization for the unified CapacityProfile element.

CapacityProfile is serialized as:

{
  "uid": 1, "name": "g3_solar",
  "owner_kind": "generator",
  "owner": "g3",
  "profile": [...]
}

owner_kind is a string parsed via the project-wide require_enum helper — fail-fast, ASCII case-insensitive, with an (expected: generator, demand) hint on typo. This matches gtopt's StrictParsePolicy convention (no silent fallbacks at parse time).

Legacy demand_profile_array / generator_profile_array JSON keys still resolve to the existing DemandProfile / GeneratorProfile types; the legacy → unified folding happens in Commit 2.