Ben Affleck Thanks Estranged Wife Jennifer Garner Following Stint in Rehab