The more I think to all of that, the more I begin to feel that Fox, Sony and Marvel should find an agreement.
Fox and Sony have right to Marvel characters that (well, with the exception of Ghost Rider, but, after its failure on BO, he may return to Marvel pretty quickly) are the most bankable (in theory)
On the other hand, Marvel is tied to realase two movie per years maximum, with an avenger movie every 4 - 5 years. So, if Marvel wants to produce a movie about Black Panther, Ant Man or Doctor Strange, it would be impossible if Spiderman or Fantastic Four returns to them, knowing that IM3, Cap2 and Thor2 are already in the starting block.
No, they should make a deal with both Sony and Fox at the same time : Letting them produce their FF / spidey / DD / X Men movie, from which Marvel will benefit (But under Marvel supervision, to not let another Elektra happen, it would be really sad)
And, when an avenger movie comes, have Marvel use whatever character they want (this time, with Sony and Fox agreement, to not interfere with the storyline of their solo movie), even if it means the distribution by one of the other studio.
I think everyone may found an interest in it. Fox and Sony then wouldn't worry about the licenses, they would have better relationship with both Marvel and the general audience (how can you make the maximum profit from a license if you aren't in good term with the fans ? It's expecially the case with fox), Marvel coul use Dr Doom or galactus in an avenger Movie, that would be awesome, and Fox wouldn't have the shame to see Marvel succeed where they failed with their previous try (Elektra, for exemple)
As much as I really hate Fox, it must be a good deal for everyone, and the wisest one.
That being said, I don't think that the X Men franchise would mix with the avengers one well (except if you really want wolverine and beast in an avenger movie). X Men and the MCU have pretty much nothing in common (except Scarlet witch and Quicksilver, but Magneto is their only link to the X Men universe)