Proof of classical versions of the Bousso entropy bound and of the generalized second law