Obviously there's a lot of confusion around the perfect tense, and we could fill volumes with descriptions and explanations of how it's used. However the thing to bear in mind is that it is basically a present tense, where present refers to whatever point in time the speaker is in when he uses it. With that as a reference, the perfect covers a timespan from a point before that "present" and up to it.
I have been writing this letter for an hour.
Here the "present" is now, and the timespan began an hour ago.
I had been writing the letter when Tony arrived.
Here the "present" is the point in the past when Tony arrived and the timespan is an unspecified period before that point. It simply describes what was going on before and up until the point that Tony arrived.
With the present perfect, you can mention when an action began, but you can't use any temporal that would suggest that you're referring back to the event as a finished, completed action at any point in the past, because, remember, it is for all intents and purposes a "present" tense - so it always refers to now. So *I've seen him yesterday - doesn't work because yesterday is over. However you can say: I've seen him today - if today is still today when you say it. At the end of today, you would have to say, looking back, I saw him today. (This may not be so in British English - I couldn't tell you. They often use the present perfect where we use the simple past).
The past perfect is different in this respect; You can refer to an action that continued or was valid up until the referenced point in the past as a completed action: He had written a novel in 2013. It simply cites it as an accomplishment of sorts - an action that was completed by that point in time.
Using the progressive simply implies that it was a repeated or ongoing action:
He had been writing a letter
= this is what he was engaged in up until the point referenced in the account, but not a completed action.
Also note, that the perfect is open ended; the action is understood to have started at a point before, continued or been valid through to the point reference (now or then) and may or may not continue. That is why: I haven't seen him today = not yet, not so far... but I may still see him at some point before the day is over.
I realize this is probably a vague answer to your question - more of a general overview. If you have any specific points you'd like me to clarify, that I missed, please ask. I've been teaching the perfect to Russians for a year and have gotten pretty good at it :)
We tend not to speak of having known someone unless there’s a fixed period of time, either explicitly mentioned or implied by the situation (e.g. the person is deceased).
With that in mind, I would switch your two usages to describe the other scenarios, with slight alteration:
It was the first time that I’d seen her since I was in elementary school. A couple of days ago, when I saw her, she acted as if she hadn’t known me (for eight years when we were kids). I think she didn't remember me.
In this case, there’s a specific timeframe in which knowing occurred, which has since ended.
I broke up with her a couple of weeks ago, and we saw each other yesterday. At that time, she acted as if she didn’t know me. She definitely knew who I was, but pretended as if she didn’t know me because she didn't want to talk to me.
This is the common use of the phrase. We think we either know someone or we don’t. It’s like a light switch. She acted like the light was off; she acted like she didn’t know you.
Another common way English speakers would discuss something like this is to say “she acted like we hadn’t met” or “she acted like we’d never met”. These use “met” in the sense that you meet someone and from that point forward you know that person.
Best Answer
All of these options are acceptable, but the first and second ones are probably the best. In some cases, like the one in your last example, an action doesn't happen at one specific time, but naturally and slowly grows over a somewhat longer period of time. You don't really start dating someone at one specific moment: it is a process, not an event.