Robust Estimation for Random Graphs