core: extend `core_select_lib` to be used for other libs than just

`kivy.core`.

Had a discussion about this change and a few others on irc with tito, where it was suggested that the changes might be better suited for garden.

Doing this pull just to be sure whether this part too belongs in garden and not just the resulting modules/widgets that make use of this part.