Deactivate route handlers before destroying container in App.reset()

This patch fixes issue #2649. When an application is reset it ensures that the current route handlers are deactivated before destroying the container. This allows properties to be set on objects in the container on route deactivation.