Fix MemoryHunk.__repr__

`MemoryHunk.__repr__` was using `self.data` instead of `self.data()` (or `self`), causing debug logging to raise. I also added a test to ensure `__repr__` isn't called when logging is off.