This is the first set of patches in an effort to create more generic image loading/conversion code that can eventually be shared.
-- v2: d3dx9: Preserve the contents of unaligned compressed destination surfaces. d3dx9: Split off image decompression into a helper function. d3dx9: Split D3DXLoadSurfaceFromMemory functionality into a separate function.