**Edit:** I reworked the entire patch to have a smaller scope.
**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.
**Changes**
There are no functional changes, nothing in the outliner should behave differently than master. There are twoa few major changes here:
* Update `outliner_item_select` to select, activate, and extend theuse a bit flag for selection types. This function can be used anywhere from the outliner code to select and activate elements. ThisI chose to use a bit flag over 5-6 booleans because I think it makes the codee generally cleaner.
* Use `outliner_item_select` in a few places for selection* 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.
* Use `outliner_item_select` rather than `outliner-item_do_activate_from_tree_element`.
* Move mode toggling logic to a separate function `outlier_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.