A Time-over-Threshold technique for wide dynamic range gamma-ray spectroscopy with the AGATA detector