fix #1032 viewport sizes updated when the first autoresizable element is registered

viewport sizes are now also updated when the first autoresizable element is registered, and not only when Layout singleton is loaded or a resize is done.

cherry picked from the commit with SHA d6be79e807df82f74c8d72afe19c38072f9a9942
v1.4.13B