The Cardy limit of the topologically twisted index and black strings in AdS5