More dynamic config fixes.

* Ensures that `AppNameENV` and `EmberENV` are setup *before* the vendor files have been loaded.
* Ensures that the `<base>` tag changes when the config file is updated.
* Injects the `/tests/index.html` with the `test` environment configuration (was previously whatever server was running).

Address #1750.
Fixes #1793.