The fluctuation-dissipation dynamics of cosmological scalar fields