An energy interpretation of a stationary functional for the variational solution of the nonlinear Poisson equation in semiconductors at thermal equilibrium