I think when a ally is should you should have 24 hours to collect the gold before it can be stripped from you but the ally must be held for more the 24 hours for this kick in.
Going after ally gold is vital in weakening stronger players. Yes it sucks when it is done to you, but it is also a necessary evil. If you think you are going to lose ally gold, throw up a shield. Also recommend keeping a shield up during FFA if you think you may have an ally sold.