Fix a bug in AbstractOffheapArray

Needs to properly handle the case where you allocate or resize an array to have
zero elements.