Prime Minister David Cameron said on Thursday that the government, seeking to prevent a repeat of riots and looting in London and other British cities this week, might bar suspected troublemakers from using social media and other digital communications tools.