Temperature Measurement by a Nanoscale Electron Probe using Energy Gain and Loss Spectroscopy