Learning representations of irregular particle-detector geometry with distance-weighted graph networks