A refinement of the difference between two integral means in terms of the cumulative variation and applications