Both Sony and Fox have been trying to expand their existing superhero universes in order to compete with the box office monolith that is Marvel Studios and with Warner Bros. who, as the sole rights-holders for DC Comics's stable of characters, is widely assumed to be a #2 in waiting as soon as they start making movies more frequently.
The scene included in the credits (identified alternately as a mid- or post-credits stinger) will not be an original tease developed for the Spider-Man movie, as many of Marvel's mid- and post-credits sequences have been; instead it will be a scene from the film, featuring Mystique, Havok and Toad squaring off against Stryker and a number of soldiers. Based on still photographs taking place during and around that sequence, other mutants may be involved as well, including Ink, a minor X-Men character created by Arrow Executive Producer Marc Guggenheim.
There is no indication that this is a sign of future collaboration between Sony (who controls the Spider-Man universe) and Fox (whose X-Men and other mutants are joined by the Fantastic Four). Rather, this seems to be more akin to Warner Bros. attaching the The Dark Knight Rises trailer to Marvel's The Avengers, but on a much larger (and potentially cooler) scale.
The Amazing Spider-Man 2 is out in the UK and most international markets today. It hits US cinemas on May 2. X-Men: Days of Future Past opens on May 22 overseas and May 23 here.