Oh Lmh, my heart really goes out to you. I am not religious either but found myself kneeling by the side of my bed the other night, actually praying for my mother's release. I do understand but there seems ro be no rhyme or reason to how long someone can go on, it is incredible sometimes how the human body and spirit keeps fighting for life.
Re your son, he is very, very lucky to have had a great grandad and it is good that he visited him but indeed there is probably a point where if it starts to upset your son it is not longer a good idea for him to visit. Mum loved it when children visited her nursing home, she would watch them with a smile and absolute fascination. Don't feel bad about their relationship ending - it was always going to have to at some point, sadly but like I said both your son and your grandad are lucky to have known each other and to have had any sort of bond.