Direct reciprocity in structured populations