I'd have to wonder if the optimism really comes from envisioning a positive future (Ni) or in believing that you can make this future happen (Te). Also how much of this vision involves avoiding negative pitfalls that can occur along the way?
I don't think that the definition of either function includes engaging in the behaviors you cited.
This is correct.
Ne is optimistic and Ni is pessimistic as far as functions go. This is because the extraverted functions are optimistic and the introverted functions are pessimistic. Being an ENTP doesn't make me a total optimist, but my pessimism comes from Ti and not Ne. Likewise an INTJ is going to get their optimism from Te rather than Ni.
I don't think any function is optimistic or pessimistic by definition. A function is merely a tendency to be energized in a certain manner. So, if you are an intuitive, you are more easily energized by using your mind more than your senses, if you are an extrovert you are more easily energized by acting rather than remaining passive.
Whether a person of a certain type is more optimistic than a person of another type is a context specific question. A person who is optimistic by definition tends to think that his future will be well. A person who is pessimistic by definition tends to think that the future won't be well. Whether one has a habit of thinking the future will or won't be well has more to do with extra-typological factors rather than typological factors. These factors are psychological in nature. For example, what was his or her upbringing like? Were most of his expectations in life fulfilled? Altogether, were his life experiences such that he or she has a reason to hope that something good will happen in the future?
At last, I do think that there is some merit to this debate regarding whether or not a certain function is more optimistic than another function. After all, functions are our tendencies to think in a certain manner. In the Western culture, it is much easier to create a scenario where good things happen for you if you are outgoing, a conformist and a people person. Our culture is decidedly unintellectual, person focused and promotes interaction rather than passive activity.
Your conclusion is correct, but not for the reasons that you state. Ni people tend to be more pessimistic than Ne people because the Western culture is less accommodating to them than it is for Ne people. I don't think that there is anything inherent within the concept of Ni or introversion in general that predisposes a person to be negative other than this: since an Introvert is much more comfortable with contemplation than action, action seems to him something that goes against his very nature. Hence, he may have a mildly negative attitude towards action because of his nature. However, this could quite easily be overcome. The Introvert is never a complete introvert, or his dispositions are not such that he gains positive energy only by contemplation and never by action, as Extroverted tendencies are part of the psychological economy of every introvert. Hence, any Introvert can avoid becoming intensely hostile to the world by simply putting some basic limitations on how much time and effort he spends on interacting with the world. The extroverted components of his psychological economy will demand some interaction and therefore a certain dose of interaction will enable him to engage in activity and to gain positive energy at the same time.
A person who has a dominant Ni function and behaves in the manner that I described should not be focusing much more on negative possibilities rather than the positive.
As a general note, I suggest that when we are attempting to understand the causes of a person's actions or simply put, understand how people are, we should step away from typological explanations and embrace the psychological ones. Instead of saying that somebody is a certain way because they are of a certain type, we should regard the circumstances of that person as the true cause of their nature.