ir: Add Nested Storage to Variable.
semantic: Rewrite nested functions as delegates.