rework obj references of LocalBuffer

now LocalBuffer.buffer is an ndarray created everytime it is invoked.
it holds a reference to LocalBuffer, such that even if the LocalBuffer
object has left the scope the memory is stored as long as an input/output
array is sitll in scope