Introduce a Buffer class and use it to replace custom API definitions for RenderCapture and xbmcvfs.File.