SERVER-9538 Only update BufBuilder's len if successfully grew

Otherwise BSONObj destructor will try to grow again to add EOO byte,
causing a double exception and terminate() call.
SERVER-9333 clear ghostcache at reconfig time
SERVER-9333 correct reference counting of GhostSlave members

The _ghostCache contains shared pointers to GhostSlave members.
When we clear this cache, we decrement all the reference counts to these objects.
Because we were not keeping a shared_ptr to a GhostSlave object in percolate(),
but instead were using a bare pointer, this caused the bare pointer to be deleted
out from under us when we cleared the cache.  This in turn caused the internal
objects like the OplogReader to be deleted, which caused segfaults in percolate()
when we attempted to advance the oplogreader cursor.
SERVER-9333 wait long enough for slow builders like Windows Debug