Fix trace output window hang by passing on the UI thread to the writer.
Also fixed the UI marshaling by passing the Dispatcher rather than using ThreadHelper which is unadvised for use in the MSDN documentation itself.
Moved service locator one level up since it's generally useful.
Removed package-level initialization since that would cause problems if more than one package uses the same version of Clide.