Improved canonical variational theory for chemical reaction rates. Classical mechanical theory and applications to collinear reactions