Share pin bookkeeping between pin() and pin_empty.
pin() sizes the allocation from the input tensor, so a 0-element
dtype template cannot go through pin(); both paths now use _new_locked,
and pin_empty is a thin pin_memory(alloc_shape=) wrapper.
Signed-off-by: tunji-ruwase_snow <tunji.ruwase@snowflake.com>
Co-authored-by: Cursor <cursoragent@cursor.com>