After years of cellphone bans, many teachers now invite students to use smartphones for homework and during class