Tied to a tree for four years, the dog suffered countless hardships until a miracle changed his life forever