LPS-40207 Modify logic in LayoutStagingImpl.isBranchingLayoutSet() to shortcut heavy operations.

Hi Shuyang,

According to profile, com.liferay.portal.model.impl.GroupImpl.isStaged is invoked many times which should be skipped when staging is disabled. 


Thanks.
Tina.