High resolution gamma-ray spectrometer with MHz capabilities for runaway electron studies at ASDEX Upgrade