Happy New Year!
Fixing application environment checks

Fixes the application environment not being checked for production mode properly.
The constants before were being compared to a string (always failed). 
This changes them to PHP constants and defines them before use by importing 
them from the external environment or defaults to 'prod'. This update was
also made to the dev bootstrapper and the config loader, which was missed before.