Colloquially, to a native English speaker, the distinction in most of the sentences you cite is a small one. You would certainly be understood with either usage and most listeners would not even notice a problem. (Though, as commenters have noted, the bigger problem is that you have to say "rather than" in this construction.)
However, the proper grammatical usage is the infinitive construction. Why? Because that's the documented idiomatic construction and not really for any other reason.
Now, you might properly use the -ing construction in the following construction:
It is better to be swimming rather than [to be] running.
In that sentence, you would be using the infinitive of "be" which then requires an -ing form of the verb. (Thus, we are still using the infinitive after "rather than", but we have inserted the verb to be so that we can use the gerund form. The second to be is optional because it is implied already by the first to be.) There is a subtle distinction between the two sentences:
It is better to swim rather than [to] run.
It is better to be swimming rather than [to be] running.
These sentences above are not really interchangeable. The first makes a general point about the two forms of exercise (probably about the health effects), whereas the second sentence seems to comment on the time period during the action (perhaps it feels more pleasant or enjoyable).
Now, in your sentence #5, you should definitely say "to avoid using." Why? Because certain verbs take "to verb" constructions and others take "verb-ing" constructions:
I prefer to use chopsticks. [Correct]
I prefer using chopsticks. [Can be correct in the right context, emphasizing the time during the action.]
*I avoid to use chopsticks. [Incorrect. Avoid doesn't take a to+verb after it.]
Don't confuse the above constructions with:
I breathe to live. [I.e., I breathe in order to live.]
I was born to run. [I.e., I was born in order to run, a poetic way of saying that running is my reason for living.]
I was born running. [I came out of the womb with my legs running (probably a metaphorical use).]
Those are all different meanings and different grammatical constructions, even though they look similar.
Both are fine. The difference is in how the speaker is choosing to frame the event in time.
The goal that France have been looking for is choosing to treat this as an event extending to the present. The goal that France were looking for is choosing to treat it as an event in the past.
Both are grammatical and idiomatic. In this case there is very little difference in meaning.
The people who tell you that it depends on the objective question of when the event or situation finished, are giving you a simplified explanation to try and make it easier to understand; but their description does not match the way that English is actually used.
Many choices in the compound tenses of English (eg the choice of past vs. present perfect, past vs. past perfect, past vs past continuous, perfect vs. perfect continuous, past vs. perfect continuous, simple present vs. present continuous vs. future) do not correspond to objective differences, but to how the speaker is choosing to construct the temporal relationships between events, and often a different choice would be equally appropriate.
Best Answer
The -ing forms in this sentence are not used as components of tensed verbs in the continuous construction but as nouns, objects of the preposition for.
When an -ing form is used this way, as a noun, it is called a gerund. Gerunds act like both nouns and verbs. As verbs they take subjects and objects and are modified by adverbials; but as nouns they (or the clauses which they head) may serve as subjects or objects in a clause or as objects of prepositions.