Fix segfault with AMQPConnection::setVhost

Looks like a typo. I've added some test to prevent similar issue in future.