Spawn the correct number of items when deconstructing etc. Fixes #909.

Also did some cleaning.

And gave artifacts a more sensible itype_id.