Restricted Lie algebras with bounded cohomology and related classes of algebras