Short-range structure in solid and liquid CuBr probed by multiple-edge x-ray-absorption spectroscopy