devel/gn: modernize build
- Unbreak with GCC
- Unbreak on DragonFly
- Allow Python 3.x
- Allow debug builds
- Convert to HAS_CONFIGURE
- Convert to do-build from USES=ninja
- Drop default build dependency in do-test
- Drop unnecessary glob in CONFLICTS_INSTALL
PR: 238353
Reviewed by: cpm
Approved by: Oleh Hushchenkov (maintainer)