My hypothesis about Mary is that she is an operative sent in by Mycroft to keep tabs on John. Mycroft said he was watching him. Also she could distract John from looking too closely at the faked death if John was getting close and cheer John up if he was getting so depressed he would off himself(which we have seen he could be prone to do.) had to keep John safe for his little bro.
Anderson imagining Sherlock there because he is driven mad from guilt is awesome.
I like Sherlock's interaction with his parents, It was very in character, Sherlock has a childish personality and it was like when a person is young and their friend comes over. Most kids/teens are quick to get their parents out of the room. they love their parents but they want to play with their friend.