A thermal immersed boundary–lattice Boltzmann method for moving-boundary flows with Dirichlet and Neumann conditions