The i-band tully-fisher relation for cluster galaxies: a template relation, its scatter and bias corrections