**Edit:** I reworked the entire patch to have a smaller scope, and to be much simpler.
**Motivation**
A cleanup of the outliner selection functions is needed to fix {T71812}, and is also to allow other changes during my 2020 gsoc project. It would be great to have this in master rather than my `soc-2020-outliner` branch so the mentioned task (from 2.81) can be finished.
**Changes**
There are no functional changes. The main change is access to the `do_outliner_item_activate_tree_element` function, nothing in the outliner should bewhich used to have differently than mastertwo entry functions. There are a few major changes here:Now all access to the outliner selection/activation functions starts in `outliner_item_select`.
* Update `outliner_item_select` to use a bit flag for selection types. This function can be used anywhere from the outliner code to select and activate elements. I chose to use a bit flag over 5-6 booleans because I think it makes the code generally cleaner.
** This function is now the parent function for all selection, activation, mode toggling, etc. The same functions are called internally, but only have one parent.
* Us* Remove `outliner_-item_select` rather than `outliner-item_do_activate_from_tree_element`.do_activate_from_tree_element` in favor of `outliner_item_select`.
* Move mode toggling logic to a separate function `outliner_item_mode_toggle`. This function is still called when activating object data, so no behavior has changed, but this will make it easier to remove from the selection code in the future when {T68498} is implemented.
* A few functions were renamed to make purposes more clear.
I'm fairly certain no behavior has changed because the same functions are still used for the actual selection and activation functionality, but additional testing would be nice to verify that. The only thing that might need updating is the naming of functions and enums.