Faced with scandals and complaints involving teachers who misuse social media, school districts across the country are imposing strict new guidelines that ban private conversations between teachers and their students on cellphones and online platforms like Facebook and Twitter.