The American Eagle and Aerie parent company posted second-quarter gains and offered a more optimistic take on the second half.