Who Tobi is?
Answer
He isn't an Uzumaki
He was able to recognize a Contract Seal, a Reverse Four Symbols Seal and we all know fuinnjutsu is what Uzumaki were known for. however he was also able to recognize Torune's insects, Edo Tensei and Danzo's seal on Sasuke, Susanoo, Kakashi's Kamui, so this may just be his general knowledge on techniques, his hair isn't red, his chakra isn't particularly powerful, he is most likely an Uchiha given his intricate knowledge on the dojutsu and the clan's history.
He isn't a Senju
Senjus were known for great skill in different kinds of techniques, he depends mostly on the Sharingan and his Space Time technique which is most likely a Mangekyo technique so he's most likely not a Senju. Also if he were a Senju he wouldn't need Hashirama's Senju's cells.
He isn't from an random clan since he's so knowledgeable on the Rikudo Sage and the three clans that descended from him so....
CONCLUSION: He is an UCHIHA
Which Uchiha....let's find out.
Since he knew Madara, and we all know Madara died young as seen from his appearance when revived as an Edo Tensei, he must be either Madara's age or around Danzo, Onoki and Sarutobi's age since they are the only generation old enough to know Madara's generation, he is also very old as seen from the wrinkles on his face and the fact that he called Konan(who would be nearing 40) a child, the only Uchiha's that fit this age bracket are:
Madara
Izuna
Kagami
Elder son of the Sage.
Madara is dead as seen from his revival as an Edo Tensei.
Izuna is dead as seen from his dead body in a coffin, added to the fact that he and Tobi have different hair colour.
Elder son of the Sage would probably be too powerful to need help in capturing bijuu and would have a more vast arsenal of jutsu as the son of the most powerful human to ever walk the earth, he would also know the nine tailed beasts by name.
The only option left is Kagami, how could Kagami be Tobi?
Here are the facts----
He has Tobi's hairstyle and color.
He had a bag under his eye even when he was young and Tobi has bags under his eye.
He knew Hashirama and Madara as seen from the fact that he was old enough to witness Tobirama sacrifice himself and appoint Hiruzen as Hokage. He knew that generation.
According to the databook he hated the Uchiha clan and revolted against the Senju's rule so he has motive for using Kurama to attack Konoha. And this could be why he allied with Madara.
NOW HOW DOES NAGATO AND MADARA COME INTO THE MIX?????
MY THEORY
He must have known Madara as a kid and agreed with his hatred for the Senju and Hashirama. Madara must have told him his story with Izuna through genjutsu and then how to awaken the Mangekyo Sharingan which then allowed him to read the tablet to an extent as well. He kept his Mangekyo a secret from the rest of the Uchiha clan so as not to draw attention. When Madara left the village, he stayed behind to act as a spy for him. I think he may have helped Madara locate Kurama since we all know Tobi can find anything he wants which is why Kurama when he saw him knew him. When Madara fought against Hashirama and lost, he took Madara and treated his injuries, implanted Hashirama's cells in both himself and Madara, however only Madara awakened the Rinnegan. He kept on as a normal Uchiha in the village and grew up to oppose the Senju's rule along with other Uchihas but it was too late, as Madara warned. The injuries from the battle with Hashirama were slowly killing Madara, but Madara continue to train and master the Rinnegan. When Madara was between 40-50 years old, he found a baby Uzumaki by the name of Nagato in Amegakure and after his death, Tobi(Kagami) transplanted his eye into the baby in the hopes that he would be able to awaken the Rinnegan and revive Madara. In the meantime, Kagami faked his death during the Second Shinobi World War and went into the shadows. Nagato grew up and found Yahiko and Konan and they formed Akatsuki, Tobi(Kagami) may have been one of the founders of the organisation since he claimed to have spurred Yahiko. After Yahiko's death, he revealed himself to Nagato and Konan as Uchiha Madara, warped their idealogy to use to his own benefit and they joined with him. He then set his sights on Kirigakure and controlled the jinchuuriki of the Three Tails with genjutsu, how he did this I do not know but I have a theory that he genjutsu'd the Three Tails before it was sealed into Yagura then genjutsu'd Yagura. Its possible since Minato saw it fit to remove Kurama from Tobi's control before he sealed in into Naruto meaning if he had just sealed it then Kurama would still be under Tobi's control. With the power of the Three Tails, Yagura became Mizukage in no time. However, the genjutsu was discovered and somehow Tobi lost control of both Yagura and the Three Tails, my guess is when the genjutsu was discovered Yagura was killed since Kirigakure did not want the Three Tails to fall into enemy control, so that the bijuu would be later revived on its own elsewhere. OR Yagura killed himself or Tobi made Yagura release the bijuu in that river. Anyways, his dealing with Danzo are in my other thread My Uchiha Massacre Theory