Treeview may lose focus when left/right arrow is used

In a treeview, for example the hierarchal view of the
styles and formatting panel, if your not on a node that is
expandable or collapsable when you press the left or right
arrow key, the focus will move away from the tree view in
a very awkward way. This patch makes the control work more
like a native treeview.

At this point I don't feel confident about the surrounding
code to avoid the code duplication that this patch adds.

Reviewed-on: https://gerrit.libreoffice.org/10956
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
(cherry picked from commit a6f78bf8fd5dc768cc8c37ca717d7bad8fe2dc81)

Change-Id: Ibd04cf5329b4d226aac102d214a45e45811982e7
Reviewed-on: https://gerrit.libreoffice.org/11255
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>