Gap gets it done in Q4, earnings advance