PointBuffer::pack() should return heap-allocated buffer so multiple copies aren't made
use scoped_ptr to manage packed buffer lifetime
PointBuffer::pack returns heap-allocated buffer now
used PointBuffer::pack instead of custom packing stuff