The Gini index, the dual decomposition of aggregation functions, and the consistent measurement of inequality