[SPARK-3666] Extract interfaces for EdgeRDD and VertexRDD

This discourages users from calling the VertexRDD and EdgeRDD constructor and makes it easier for future changes to ensure backward compatibility.
ctor private too