The new feature forms part of Twitter chief executive Dick Costolo's pledge to help users protect themselves and deal with being attacked and harassed by trolls – a common problem for certain users on the social network.