This sounds like he is going to need to be shaved down completely. Dogs that are severly matted are usually in quite a bit of pain. I think your best bet is to take him to a vet to be sedated and then shaved down. There could be some very tender spots under the mats and shaving and treating would be the best thing to do.

I have to ask - why has the dog been there so long. A year is a very long time to be in a shelter. Has anyone tried to groom him or treat him before?

It is very sweet of you to try to help this boy. Hopefully the shelter will allow some sort of treatment for the poor thing.