Auto set the release stage

Set the release stage to dev if we are compiled with DEBUG on, or if the
debugger is attached - else default to production.