Grain-boundary resistivity versus grain size distribution in three-dimensional polycrystals