add cancelAfter utility function
use cancelAfter
AbstractBuildSlave.attached() refactored
Fixes in tests