radeon: move some functions to r600_buffer_common.c