The top 4 patches of this, refactor the aco/radv shader interface to use a callback that builds the shader in radv rather than in aco.
This moves these types of out of aco, and makes radeonsi interfacing a bit simpler hopefully.
radv stores the shader binary as a linear single allocation, whereas radeonsi prefers to store some pointers to different allocations. I think this should provide enough flexibility to have both work.
There may be potential to refactor radeonsi later to use something similiar, but it wasn't obvious to me at this point how that might look.