That function splits a number into it decimal components, except for the lower significance ones, which are grouped.
For example, the number 84938394 will be split into 80000000, 4000000, 900000, 30000, and 8394 (if the dust threshold is 10000).
This was used by the ring signature process to pick outputs from the blockchain with the same amount as the one that's being spent, since otherwise there would be too many different amounts, and thus poor selection.
chunk_handler and dust_handlers are just two functions called with each of the split amounts above. Amounts below the dust threshold are called dust, and typically "complex" numbers which have few, or no, other potential ring members on the blockchain.
This is not used with RingCT anymore, since output amounts are hidden, and every rct output can be used in a ring signature with any other, doing away with the need for splitting amounts into those "canonical" ones.