Improve sbws bandwidth accuracy

Better designs SHOULD:

  • use at least 4 measurements that are at least 6 hours apart, because:
    • there is a daily cycle
    • each day contains 2 similar points in the cycle (it is an up and down cycle)
    • if all 4 measurements happen within a few hours, they will still be biased
  • use at least 3 days of observed bandwidths, because:
    • a single download at the changeover point can affect 2 days
  • weight bandwidths based on the time since the last bandwidth, because:
    • if we only record bandwidths when they change, bandwidths that are updated soon after the last bandwidth are weighted too high
    • we can either:
      • record the bandwidths every hour, even if they haven't changed
      • weight each bandwidth by the time since the last bandwidth
  • use a decaying average for measured and observed bandwidths, because:
    • recent bandwidths are closer to the relay's current capacity
    • and we want accurate results