text: Title: Statistics log division by zero errors
  Body: ### The problem
  
  The statistics sensor produces division by zero errors in the log. This seems to be caused by having values that have identical change timestamps.
  
  It might be that this was caused by sensors that were updated several times in a very short time interval and the precision of the timestamps is too low to distinguish the two change timestamps (that is just a guess though). It could also be that this is something triggered by the startup phase.
  
  I also saw that there was a recent change in the code where timestamps were replaced with floats, which might have reduced the precision of the timestamp delta calculation.
  
  I can easily reproduce the problem, so it is not a once in a lifetime exceptional case.
  
  ### What version of Home Assistant Core has the issue?
  
  core-2025.3.4
  
  ### What was the last working version of Home Assistant Core?
  
  _No response_
  
  ### What type of installation are you running?
  
  Home Assistant OS
  
  ### Integration causing the issue
  
  statistics
  
  ### Link to integration documentation on our website
  
  https://www.home-assistant.io/integrations/statistics/
  
  ### Diagnostics information
  
  _No response_
  
  ### Example YAML snippet
  
  ```yaml
  
  ```
  
  ### Anything in the logs that might be useful for us?
  
  ```txt
  `2025-03-22 09:57:43.540 ERROR (MainThread) [homeassistant.helpers.event] Error while dispatching event for sensor.inverter_production to <Job track state_changed event ['sensor.inverter_production'] HassJobType.Callback <bound method StatisticsSensor._async_stats_sensor_state_change_listener of <entity sensor.inverter_production_avg_15s=0.0>>>
  Traceback (most recent call last):
    File "/usr/src/homeassistant/homeassistant/helpers/event.py", line 355, in _async_dispatch_entity_id_event
      hass.async_run_hass_job(job, event)
      ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
    File "/usr/src/homeassistant/homeassistant/core.py", line 940, in async_run_hass_job
      hassjob.target(*args)
      ~~~~~~~~~~~~~~^^^^^^^
    File "/usr/src/homeassistant/homeassistant/components/statistics/sensor.py", line 748, in _async_stats_sensor_state_change_listener
      self._async_handle_new_state(event.data["new_state"])
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/src/homeassistant/homeassistant/components/statistics/sensor.py", line 734, in _async_handle_new_state
      self._async_purge_update_and_schedule()
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
    File "/usr/src/homeassistant/homeassistant/components/statistics/sensor.py", line 986, in _async_purge_update_and_schedule
      self._update_value()
      ~~~~~~~~~~~~~~~~~~^^
    File "/usr/src/homeassistant/homeassistant/components/statistics/sensor.py", line 1097, in _update_value
      value = self._state_characteristic_fn(self.states, self.ages, self._percentile)
    File "/usr/src/homeassistant/homeassistant/components/statistics/sensor.py", line 142, in _stat_average_step
      return area / age_range_seconds
             ~~~~~^~~~~~~~~~~~~~~~~~~
  ZeroDivisionError: float division by zero`
  ```
  
  ### Additional information
  
  _No response_