Stockpile iterator

An efficient way to check stockpile contents, making autotrade and stockflow a bit faster.  Also fixes a minor bug in autotrade, where it would keep sending empty bins to the depot as soon as they get assigned to the stockpile.