fix bugs in librados::ObjectIterator

There are a few ways this doesn't behave like a proper iterator.
Fix those, and another segfault-causing bug that made the librados
list tests fail sometimes when they switched from their own pools
to separate namespaces.