I abbreviated Peter as P in the title for brevity; feel free to abbreviate thus. Please explain user Ed Staub's answer below, since it only seems to present this stance? To me, both 1 and 2 mean that Joe and Peter are friends with each other. Yet what possible reasons exist to explain the differentiation below?
To me, "Friend of Peter" and "Friend of Peter's" mean the inverse of each other.
In "Joe is a friend of Peter", Joe is the active person in the friendship - it describes Joe's active relationship to Peter. Peter is one of the people Joe expresses friendship toward.
In "Joe is a friend of Peter's", Peter is the active person in the friendship - it describes Joe as being the object of Peter's friendship. Joe is one of the people Peter expresses friendship toward.