Added unit tests for Configurator, and refactored Configurator and TabContainer

Important changes:
- Unit tests for Configurator added, coverage at 90+%.
- Configurator now displays the alert message (the one with the refresh link) when it encounters a fatal error.
- Configurator has now exposed one private function `openResource()` in debug/test mode.