Merge changes I92cac83b,Ie897c40b

* changes:
  logd: wakeup wrap timeout if realtime changes drastically
  logd: cap how far back in-place sort will go to 5 seconds