Casimir-Polder interatomic potential between two atoms at finite temperature and in the presence of boundary conditions