Refactored Mode resolution

Introduced IApplicationModeFactory and IApplicationMode:

An _IApplicationModeFactory_ responsible for converting a String into an
_IApplicationMode_ is instantiated by Startup#createApplicationModeFactory,
which, in its default implementation, creates a _DefaultApplicationModeFactory_
capable of resolving to _DefaultApplicationMode_.