Local Distance-Preserving Node Embeddings and Their Performance on Random Graphs