Danny could legitmize Jon (eventually) as well. If his parentage is both Stark/Targaryen, he would be the unifying link between the two families. Danny might legitimize him as a Stark in exchange for not chasing his claim to the Iron Throne (which I don't think he'd want anyway, much like Ned didn't).
I can't ever see a Stark/Lannister alliance, not after everything that's happened to the Starks. I think best case scenario for the Lannisters is that they don't get completely wiped out. Tyrion has mended fences with both the Targaryens & Starks (Jamie has helped with the Starks as well) but there's still a lot of bad blood.