What merchant has the most gold?
If you complete the restore the Thieves Guild to its former glory quests, all the fences will have 4000 gold to barter with. You can further boost this via investing and the speech perk for a total of 5500 per fence.
There is a guy at the Riverwood trader who has 10000 gold once you invest with him. I don't know if it's a glitch. This was on the Xbox before the first update so it could be fixed.
Selling things in Riften is good, especially if you are part of the Thieves Guild. Then you'll have 5 merchants to sell things to. 3 in the market, 1 smith and Tonilia in the Ragged Flagon.