The k⊥-clustering algorithm for jets in deep inelastic scattering and hadron collisions