Cross-species gene-family fluctuations reveal the dynamics of horizontal transfers