A Domain Independent Algorithm for Adapting Temporal Plans