connection: properly reference count the request

Fixes #522.