I considered making this `Either[Option[ByteBuffer], Option[Iterator[Any]]` or `Option[Either[ByteBuffer, Iterator[Any]]`, but chose not to because a caller is only prepared to deal with only one of the alternative types.

For example, if I used Either or Option[Either], I'd wind up writing something like

```scala
doGetLocal(blockId, asValues = false).left.get
```
or

```scala
doGetLocal(blockId, asValues = false).map(_.left.get)
```

when calling it.  This isn't any more type-safe than the explicit cast, since it still throws an exception if we receive data of the wrong type.

doPut(), on the other hand, accepts `Either[ArrayBuffer[Any], ByteBuffer]` because it's actually capable of operating correctly with either of those inputs.