Abbreviate quantity overlay on icons

If a quantity is over 1000, we remove the last 3 digits (integer divide
by 1000) and add a "K" suffix. Then the actual total is displayed in the
item's long tooltip next to its name.