Trigonometric Lie algebras, affine Lie algebras, and vertex algebras