Fold type_refs before init (e.g. struct A a; typeof(a) b = ...)

Also check for unfolded type_refs in typeof/typedef resolution
Ranges now refer to a .range_store rather than another init
Partial fixes for range replacement
Array range replacement tests