Relationship between clustering and algorithmic phase transitions in the random k-XORSAT model and its NP-complete extensions