Topological field theory and surgery on three-manifolds