llvmpipe: consolidate texture memory allocation code

And fix incorrect allocation of linear memory for display targets.
This fixes fd.o bugs 27761 and 27762.
1 file changed