Locally Adaptive Algorithms for Multiple Testing with Network Structure, with Application to Genome-Wide Association Studies