Network cross-validation by edge sampling