fix: address code review feedback for Phase 3
- Issue I1: Remove unused imports (Union, Port, NameRef, PipelineStage, OpcodeCategory) from dfgraph/graph_json.py
- Issue M1: Simplify redundant single-iteration loop in graph_to_json (lines 146-149)
- Issue M2: Remove unused import RegionKind from tests/test_dfgraph_json.py
- Issue M3: Replace conditional guard with proper assertion in test_error_structure