Synchrony and tail-dependent synchrony have different effects on the stability of terrestrial and freshwater communities