@Mad Mike,
To begin with, it is not true that Quito is necessarily the capital of Ecuador, as I already showed, Quito need not be the capital of Ecuador, so it is not necessarily the capital of Ecuador. I mention this just to point out that it is a good thing that the truth of the statement is not dependent on the truth of the statement that Quito is necessarily the capital of Ecuador, for if it were, it would not be true.
Next, it is necessary that if Quito is the capital of Ecuador, then Quito is the capital of Ecuador, just as any proposition of the the form, if p, then p is necessarily true. But that, of course, does not mean in any sense at all that it is necessarily true that Quito is the capital of Ecuador. You must see the difference between:
1. Necessarily, if Quito is the capital, then Quito is the capital, and,
2. If Quito is the capital, then necessarily, Quito is the capital.
Just look at 1 and 2. The difference stares you in the face. 1. is of course true, and 2. is, of course false. You are confusing 1 with 2.
If it is true one day (May 1) that Quito is the capital, and if it is true the next day (May 2) that Guyaquil is the capital, then it will always be true that Quito is the capital on May 1 (and
not that it is no longer true that Quito is the capital on May 1) . But even that does not mean that it is necessarily true that Quito is the capital on May 1, because even if it is, it might not have been. And if a statement might not have been true, then even if it is true, that statement is not necessarily true. I think you need to be clearer about what it means to say of a statement that it is necessarily true. To say of a statement that it is necessarily true is not just to say of that statement that is is true, it is to say of that statement that it is impossible that it should be false. Clearly, it is true that Quito is the capital, but equally clearly, it is possible that it should be false that Quito is the capital. Therefore, that Quito is the capital is true, it is not necessarily true, for it might have been false, I showed, and as you apparently agree.
As for your question, I can do no better than to point you to:
http://en.wikipedia.org/wiki/Possible_world