gen.send(): Throw StopIteration. Also, explicitly shutdown finished gen.

Otherwise, some generator statements still may be spuriously executed on
subsequent calls to next()/send().
list.pop(): Don't allow ->alloc drop to zero, which causes unexpected behavior.