Improve std.build.OptionsStep
This doesn't make any breaking changes to the API, but it does add capabilities and change some behaviors, namely it adds the ability to add a type as an option, which will then be reference-able by other option declarations, and will also automatically add reference-able type declarations for values whose type doesn't correspond to an existing one, thus this shouldn't break any existing code.
Closes #13403.
I acknowledge the code is definitely somewhat hacky, and it could be greatly improved and reorganized.
From what I can tell, the CI failure doesn't seem to be caused by this PR. I ran the behavior tests (which is what seems to be failing) with the latest nightly, run with -fwine, and it seemed to occur both on my branch and master branch.
In #13865 I discovered that the unit tests for OptionsStep apparently weren't being run. There will be conflicts between that PR and this one, and I would like to merge that one before this one because it gets the CI into a state where more checks are being run, making a CI pass on this one more meaningful. Sorry for the trouble.
Was no issue, by the way. The small effort that it was amounted to just undoing your TODO on the enum, which ends up being fixed in this version of the test case - although it's still broken without the extra line adding the type as an option.