Add connection.reset function, to reset connection to initial state.

fixes #85