Ensure stored queries/write ops are executed correctly after reconnect
Merge branch 'master' into 2.0-dev