A UK bill to create a "smoke-free generation" by banning smoking for those born after 2008 has passed Parliament and awaits royal assent.