The Samsung Galaxy S6 will almost certainly get Android M in 2015. If not 2015, early 2016. It will also likely get whatever Google has up its sleeve for 2016. But after that, it's difficult to say.
Samsung devices typically get upgraded for two years before software support is killed. That's something to think about if you're planning to hold onto your next device for a long time and you don't plan on customizing your software with ROMs and the like.
The iPhone 6s should get at least three years of iOS support and could get up to four. Apple's iPhone 4s is poised to get iOS 9, its fourth major software update. That's simply unheard of in the world of Android software upgrades.
It's hard to predict exactly what will happen but it's still worth keeping in mind as we approach the iPhone 6s release.