THE EVOLUTION OF THE MASS–SIZE RELATION TO z = 3.5 FOR UV-BRIGHT GALAXIES AND SUBMILLIMETER GALAXIES IN THE GOODS-NORTH FIELD