wined3d: Move load_location into the resource.

The resource part of load_location will handle transfers between sysmem
locations (heap memory, user memory, dib) and buffers. Texture loading
and downloading from textures will be delegated to surfaces / volumes.
wined3d: Replace surface_load_location with resource_load_location.

FIXME: Check if this patch is complete enough to make sense.
wined3d: Move map_binding into the resource.
wined3d: Move volume PBO infrastructure into the resource.
wined3d: Remove surface->pbo.
wined3d: Use resource buffer mapping facilities in surfaces.
wined3d: Move buffer creation into the resource.

More code from volume_unload can be moved to resource_unload eventually.
Before doing that, surfaces and buffers have to be migrated to the new
location scheme. Otherwise the unimplemented buffer_load_location and
surface_load_location will write a lot of ERRs.
wined3d: Handle WINED3D_LOCATION_DISCARDED in surface_load_texture.

TODO: Move texture allocation to the caller, this way discarded locations can be handled in the resource.
wined3d: Handle LOCATION_DISCARDED in surface_load_drawable.
wined3d: Handle WINED3D_LOCATION_DISCARDED for sysmem loads.
wined3d: Don't bother reloading discarded surfaces when the palette is changed.

TODO: This patch seems reasonable, but when does this ever happen? Isn't
this just some leftover from the attempt to create surfaces in discarded
state?
wined3d: Discard implicit surfaces on unload.
wined3d: Don't try to flip sysmem copies in swapchain_present.

This was once an optimization for ddraw applications that mapped the
backbuffer to render movies. It doesn't work any more in the intended
fashion.
wined3d: Discard the backbuffer in discard presents.
wined3d: Allocate sysmem for client storage if it doesn't exist already.
wined3d: Introduce a function to retrieve resource memory.
wined3d: Make surface_ops->unmap specific for front buffers.
wined3d: Merge get_pitch functions.
wined3d: Move check_block_align to resource.c
wined3d: Replace surface alloc functions with resource ones.