mesa: fixes for MSVC 2013

Cc: "9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
(cherry picked from commit dafa97fed9c99e0d0c783d913717229378b575da)
i965: Fix texture buffer rendering after a whole buffer replacement.

If glBufferData(), glBufferSubData(0, obj->Size), or similar happens, we
get a new drm_intel_bo for the buffer object, and thus need to re-upload
texture buffer state so we point at the new data.

Fixes the new piglit GL_ARB_texture_buffer_object/data-sync

Cc: "9.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
(cherry picked from commit c0a9436d191d24d9aea18fcca7a79674af3a782e)
cherry-ignore: Ignore two more patches.

One of these was recently backported, (the backported commit message doesn't
have the exact format expected by get-pick-list.sh, so we add it manually
here).

On the other, I haven't heard back from a couple of requests to the authors to
backport the patch to 9.2.
cherry-ignore: Ignore another commit

This one is a bug fix for code that is not actually present in 9.2, (the code
being fixed was added in commit commit 079bdba05f ).