Change external buffer implementation to work using Buffer objects
rather than straight arrays. This makes it possible to slice and
dice the buffers more easily from inside Java code.