Hilbert cubes in progression-free sets and in the set of squares