[mongo] Only try to connect ReplicationInfo metrics when we can
[mongo] Only try to connect ReplicationInfo metrics when we can

Fix #2520
If you connect to mongo through mongos, there won’t be a `local`
database. But we shouldn’t fail the check if this happens as other
metrics would still be available.

cberry777/dd-agent,manolama/dd-agent,indeedops/dd-agent,cberry777/dd-agent,jyogi/purvar-agent,cberry777/dd-agent,Wattpad/dd-agent,Wattpad/dd-agent,manolama/dd-agent,takus/dd-agent,Wattpad/dd-agent,Wattpad/dd-agent,jyogi/purvar-agent,takus/dd-agent,indeedops/dd-agent,takus/dd-agent,takus/dd-agent,cberry777/dd-agent,cberry777/dd-agent,manolama/dd-agent,takus/dd-agent,indeedops/dd-agent,indeedops/dd-agent,manolama/dd-agent,Wattpad/dd-agent,jyogi/purvar-agent,indeedops/dd-agent,jyogi/purvar-agent,jyogi/purvar-agent,manolama/dd-agent