Device for detecting the peak value of a signal