I have scoured every detail of this episode for hours on end, and this is my solution.
Sherlock asks Molly to provide a body that looks somewhat like him from a distance, hence the phrase “I need you.” Mycroft has hired out the street with government actors. He then plants the false story of Mrs. Hudson’s shooting to get John out of the way. If he thought Mrs. Hudson had been shot, he would have gone in an instant, as he threw a man out of the window repeatedly for giving her a minor cut. Molly then proceeds to drop the body from the first floor window onto the ground. John doesn’t notice, because he’s staring at Sherlock. Sherlock jumps into the bin. John mistakes the body for Sherlock’s and begins to run toward it. The cyclist (probably a member of Sherlock’s homeless network) knocks John over rendering him unconscious for a few seconds. While John is down, the crowd of actors gather, while Sherlock swaps places with the body. One of the men in the crowd can be seen with a bag of fake blood. The rubbish truck (possibly driven by Irene Adler), drives away. The crowd begins to put the fake blood on Sherlock. John wakes up and starts running again. Sherlock takes the squash ball that has been seen bouncing along the wall earlier in the episode and squeezes it under his arm, temporarily cutting off the circulation. John can’t find the pulse and the ‘dead’ body is taken away by the paramedics. molly calls in a few favors at the morgue, and sherlock holmes is officially announced dead. This explains why Mycroft is so unemotional at Sherlock’s death, and is glancing through the papers to check that his idea worked. Another thing I found is that when John is talking to Sherlock on the phone, there is a small earpiece in his ear, possibly proving that when the coast was clear, Sherlock was going to explain, but when John got knocked down, you can see the earpiece fall out onto the ground. And that is my theory.