Structure and Cohomology of 3-Lie Algebras Induced by Lie Algebras