Structure preserving schemes for mean-field equations of collective behavior