Influence of the energy and velocity spread in the electron beam on the starting conditions and efficiency of a gyrotron