A man who jumped on to a racecourse in New Zealand during a race has been fined and handed 100 hours of community service after "an alcohol-fueled moment of complete madness."