A rigorous nonperturbative result for the glueball mass and electric flux energy in a finite volume