Finiteness theorems for algebraic tori over function fields