If your reseller goes away, your domain will be available from the registrar to transfer to another reseller. This happens all the time. As long as you are not really close to your renewal date when you find out that your reseller is gone, you generally won't have any trouble moving your domain to another reseller. Sometimes it even happens without you knowing it - a reseller will sell all his names to another reseller, or he'll go away and the registrar will transfer them behind your back.
If your registrar goes away - and it does happen - then it's more than likely they will have sold their domain "properties" to another registrar before they closed their doors. Your domain will now be managed by "Verisign" or someone else, and you'll have to transfer away if you don't want to stay with the new registrar.
If for some strange reason your registrar went away and did not sell your domain "property" first, the registry would be responsible to transfer your domain to another registrar on your behalf. Though I have heard rumors of this happening with some very small registrars, I can't confirm this.
As for ICANN doing things to make sure a registrar is viable, they do nothing of interest here. They require a registrar to have $70k in operating capital or a line of credit available in this amount at the time of application approval. This does nothing to ensure that the registrar has a viable business plan or operates his business with the intent of generating an operating profit. We were able to get a $150k line of credit without even presenting a business plan to the bank...
myOstrich Internet - OpenSRS Domain Names & Digital Certificates