These new functions control the per view layer object hiding state, similar to the selection state. All these object state checking functions now also optionally take a view layer to use instead of the active view layer. Fixes T62062.