Information Gathering in Networks via Active Exploration