Fixes #2454 - Fix loading settings in production

The Setting subclasses are not preloaded in initialization phase in
production.

Also (if Setting.first rescue (false)) is not satisfied when the
settings are not set yet. Using table_exists? instead.

Also, define constants before audited So that the constants are available even
when not migrated yet.