Address refactoring
Added a wait for the timeout poll to complete, otherwise we may dispose of the IDocumentStore before the poll finishes causing an exception.
Using stateless session, this is actually required if optimistic concurrency is turned on.
Added extra debug logging
ActiveMQ shutdown was hanging
Fixed sample reference