Use more utils functions
These series originally went out to the mailing list in 2018. I've rebased it and (hopefully) addressed all of the comments from the mailing list version.
The tl;dr is that I started out trying to de-duplicate functionality between src/mesa and src/utils, and realized that basically everything in mesa/imports.[ch] was duplicated with utils, so I deleted it.