With its potty mouth and drug habits, the teddy bear in “Ted,” seen here with Mark Wahlberg, surely wasn’t fit for kids.