Introduce API for lazily allocating buffers in ToLiteral.
Introduce API for lazily allocating buffers in ToLiteral.

This allows efficient implementation of runahead without using host memory.

Other backends can implement the behavior if/when necessary.
