Efficient random graph matching via degree profiles