Non-Gaussianities in the topological charge distribution of the SU(3) Yang-Mills theory