LPS-33315 Improve performance of VirtualLayoutAdvice when it merges LayoutSet prototypes.

Tested also with new tests for Site and Page templates (see juliocamarero/liferay-portal/pull/1590)