Diversity by Design: The Role of Contact and Homophily in Determining Persistent Friendships