Replicator Dynamics of Coevolving Networks