THE HALO MASS FUNCTION FROM EXCURSION SET THEORY. III. NON-GAUSSIAN FLUCTUATIONS