ldns: Ignore commented-out lines in resolv.conf.
This merges upstream PR 238 + an additional bug fix.
PR: 278721
MFC after: 1 week
(cherry picked from commit 3b092e4936c433889cc668ea9563c8fd437d1a3e)
(cherry picked from commit 7daf36028411c3a9c73e0c75732f9cbcbf66362e)
Approved by: re (cperciva)