Refactoring: move find_parent_scope staticmethod from FoldingPanel to FoldScope

that way other modes can use this method without requiring a folding panel.