Pick app id from the DWT_APPLICATION_ID environment var

Allow manually setting the unique application identifier using the
DWT_APPLICATION_ID environment variable. If set to "none", support
for using an unique identifier is disabled.