With conditionals (IF ... THEN), like your first example, the 'rule' (it's far more complicated, really, because some specific situations call for different constructions) is that the tense-bearing verb in the condition (IF) clause and WILL in the consequence (THEN) clause take the same past/non-past tense:
If the price goes [non-past] up I will [non-past] buy it.
If the price went [past] up I would [past] buy it.
If the price had [past] gone [perfect] up I would [past] have bought [perfect] it.
It is the function (IF or THEN) of the clause, not its position in the sentence, which governs:
I will [non-past] buy it if the price goes [non-past] up.
I would [past] buy it if the price went [past] up.
I would [past] have bought [perfect] it if the price had [past] gone [perfect] up.
Note that will here does not express tense; it implies consequence, not futurity. You may substitute may/might or can/could for will/would in all these examples.
The situtation is different in your 'shopping' example, where will/would in the subordinate clauses does express tense, and must be deployed accordingly. Let's look at two different situations:
She told me last week that she would go grocery shopping yesterday, but I told her her I would not be able to go with her.
In this case the shopping trip was in the future when you spoke with her but is no longer in the future; you must employ the past form of will.
She told me last week that she will go grocery shopping tomorrow, but I told her I will not be able to go with her.
She told me last week that she will go grocery shopping tomorrow, but I told her I would not be able to go with her.
In this case the shopping trip is still in the future; you were unable to accompany her then and you still are unable to accompany her. You may use either will or would, depending on which timeframe you want to communicate.
The perfect tenses (past or present) imply some completed action occurred before some other event and has some relevance to it.
"to go" in general implies motion or a process; thus in the perfect tenses it implies a completed action with continuing relevance. The continuing relevance can in some cases imply the subject has not returned
But not always:
I have gone to England every summer for the past ten years
The modifiers "every summer" and "for the past ten years" rule out the possibility that the subject has not returned (you can't go somewhere you already are).
I tried to change "gone" to "been" in all these sentences and it just doesn't seem right.
Been to actually works in those sentences but gone to seems more natural. Using "been" also seems to shift the meaning slightly in someways.
"had gone to law school" for instance seems to imply completion more than "had been to law school" would.
Is this use really common?
I think your concept of contrasting gone to with been to is too strict. Yes, been to implies somewhere you are no longer (because perfects represent a completed action), but gone to doesn't always mean you are no longer there. It can depending on the context.
Best Answer
The construction would had doesn't exist in English. If you are talking about something that you might do in certain circumstances, you would say:
If you are talking about something that you might have done in the past under certain circumstances, you would say:
Neither If I would had been president nor If I would have been president is correct.
To say:
is to reflect on what might have happened in the past if you had occupied the position of president.
To say:
is to reflect on what you might do or say in the event that you became president.