tests/reconnect: Prevent server from being stopped twice
tests/reconnect: Sleep before issuing new commands

This lets the connection receive the socket close event.
tests/reconnect: Add test for selected_db after reconnect
connection: Reset selected db after connecting

Fixes a bug where the client did not select the correct db after reconnecting.
Merge pull request #26 from lessandro/selectdb

Reset selected db after reconnecting