The head of the Prevent counterterrorism programme, Michael Stewart, has said he will leave his role after a report into the Southport attack which killed three young girls.