Consistent estimation of high-dimensional random graph models with dependent edge variables