Issue 3551 transition to secondary

@lloyd or @seanmonstar - mind reviewing?

An ephemeral instance is set up at transition-to-secondary

I have added a new selenium test suite - "transition-to-secondary". This case was not covered by our selenium tests before.

fixes #3551