Stop and disconnect derricks when starting to demolish.

Fixes ticket:3176.
Fix completely broken effectStructureUpdates() and remove redundant variable RES_EXTRACTOR::active.

The best part of effectStructureUpdates() was using the same variable i as an inner and outer loop variable, even
though the inner loop didn't actually do anything (except changing i).