(PUP-2738) Use block form of FFI::MemoryPointer
- Existing uses of FFI::MemoryPointer rely on Ruby GC to perform non-deterministic memory cleanup. In an effort to reduce memory consumption, use the block form of FFI::MemoryPointer to call free on pointers as soon as they're no longer needed.
- Ensure that we don't use non-local return's anywhere, due to their potential dangerous / unexpected behavior. When inside blocks, store off return values in a separate variable to be returned outside the block. When values are only used inside yields, and the corresponding unmanaged memory has been freed, return nil outside the block.