Added fix and test for issue #656 (with BasicAppHost.Dispose)

When BasicAppHost.Dispose() is called without BasicAppHost.Init() having
been called, it throws a NullReferenceException. I modified it to
dispose EndpointHost.Config.ServiceManager only if EndpointHost.Config
is not null as well, and provided a unit test (in a new project) to
verify.