A unifying framework for quantifying the nature of animal interactions