The proposed policy would require some international travelers to hand over years’ worth of their social media history.