This patch replaces the `PBONE_SELECTABLE` macro with functions.
There is a slight functional change in that for pose bones: the visibility
is now correctly accounted for. Before this change it would always look
at the `Bone` visibility. This is no longer the correct way to
check for that since a43359eb88
moved that to the pose bone
Part of #138482
Pull Request: https://projects.blender.org/blender/blender/pulls/145974