- Reorders existing code to match Godot.
- Adds `NDEBUG` for non-dev builds.
- Adds `-gdwarf-4` for Clang debug symbols.
- Adds strip link flag for GCC/Clang builds without debug symbols.
(cherry picked from commit 600e749d9b)
Now matches Godot `master` target names and supports the same flags with
the following notable exceptions:
- The default target is "template_debug", since it's compatible with
editor builds (and TOOLS_ENABLED is never used internally).
- separate_debug_symbols is still not supported, and will be done in a
separate commit.