This does some changes to the ed::greasepencil::ensure_active_keyframe` function. * The context was only needed to get the scene, pass the scene directly * Don't use the active layer by default but pass a reference to a layer instead. This makes it also possible to create keyframes on multiple layers using a loop.