Capital One posts quarterly profit, finalizes $2B stock offering