clean up the code and add more debugging steps for easier troubleshooting when someone reports issues
Easy to view diff: <https://www.diffchecker.com/3iJ9lVzH>
For 1.17 JPMS arguments, fix regex to match`^1\.(17|18|19|20|21|22|23)` or latest instead of only dot . minor versions, which is something I didn't notice in a previous PR. This should future proof it.
Support new 1.17+ Forge JPMS arguments that doesn't ship any executable jar
Fix forge latest build version option to actually use latest instead of recommended
Set build version input rules to only accept valid values of latest and recommended
Remove spaces from the version variables to avoid issues with curl. Forge site displays versions with spaces to end users