Renew the SRV/TXT records if half of TTL passed

As mentioned in RFC6762 7.1. The records only needed to be renewed if
at least half of the TTL passed. Usually A/AAAA records are included in
the response to the SRV record query, they are not refreshed individually.

Bug: 285260665
Bug: 285261577
Test: atest CtsNetTest FrameworksNetTests
(cherry picked from https://android-review.googlesource.com/q/commit:f2cc01dc126ba1bd8c89add0853546ab4627c3aa)
Merged-In: Ifd7140de0d733191256184c5481412e1822d279b
Change-Id: Ifd7140de0d733191256184c5481412e1822d279b
4 files changed