The AP sold use of its Twitter feed and made a restaurant receipt ad deal to increase revenue after losing members.