Add serverTemplatesMode to ServerEnv and use it

Previously we had hardcoded references to NormalMode/DesignMode throughout the
features.