In situation 1, which version you select (they're both grammatically correct) depends on the tense in which you're telling the story. If you're telling the story in the present tense ("So I'm walking along the street..."), you would use option A to match, while if you're telling it in the past tense ("So I was walking along the street..."), you'd use option B.
In situation 2, you'll generally want either A or C.
The essence of the grammar article was probably that in English, it's possible to discuss either past events or hypothetical future events in the present tense, as if you were placing yourself in the time and narrating from that perspective. In this case, you'd use the present-tense "first time I've been", but it's much more common to narrate this way when relating past events than when talking about future plans.
You have understood the phrase perfectly: it is another way of saying "If you had asked..."
(My personal opinion is that it is a pointlessly pompous way of saying it; but I didn't get a vote.)
The base idiom is BE to VERB, where BE is the appropriate form of the verb be and VERB is the infinitive form of any verb. It means, approximately, "suppose", in both the senses in which that quirky word is used.
Thus, in the indicative (real) mode it means be supposed or expected to do whatever VERB names. For instance, I am to go to London tomorrow means "I am supposed to go" or "I am expected to go to London tomorrow".
In the irrealis mode, expressed with the past form, it takes the other meaning of suppose, "assume as a hypothesis". If I were to go to London (or, alternatively, Were I to go to London) means "Let us suppose that I go to London" or "If we assume that I go to London".
In your example, the author asks you to "suppose" not something which happened in the present, which would be expressed as "If you were to ask world leaders today", but something which happened in the past, a few hundred years ago. You have to 'backshift' the expression from present to past.
But you can't do that in the ordinary way, by using the ordinary past form of BE, were—because you've already used up that form in the present. The workaround in English for expressing a past irrealis is to employ the appropriate form of HAVE + the past participle of VERB: "If you were to have asked world leaders a few hundred years ago".
Notice that the same workaround is employed in the ordinary, non-pompous way of expressing the same thought: "If you asked world leaders today" is backshifted as "If you had asked world leaders a few hundred years ago".
This looks like a perfect construction, but it's not; it's the past irrealis construction.
Best Answer
The first example is not quite right. We can use was when we are talking about John's state at a point in time:
Note that in the last example we talk about his being unemployed at that point in time.
When we talk about a condition that lasts for an extended period we need to position that activity relative to the point in time. We use had been to indicate that the activity completed at the point in time under consideration.
In these cases there is a very strong implication that something changed at the point in time.