Wang–Landau sampling of the interplay between surface adsorption and folding of HP lattice proteins