r600g,radeonsi: consolidate buffer code, add handling of DISCARD_RANGE for SI

This adds 2 optimizations for radeonsi:
- handling of DISCARD_RANGE
- mapping an uninitialized buffer range is automatically UNSYNCHRONIZED

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
13 files changed