graphics: enhance Texture.blit_buffer to also support Memory class