A cash-advance app became the foundation of a purchase-data business. Now Attain wants advertisers to follow the sale all the way back to the ad.