Take into account the filtering flags while filtering grease pencil channels in the grease pencil dopesheet. This PR also adds two API functions for layers : * `is_empty` checks if a layer contains no frame, and * `is_selected` checks if a layer is selected. Pull Request: https://projects.blender.org/blender/blender/pulls/110484