box-layout: Fix the axis used for the ‘other’ preferred size

When the preferred size of the box layout is queried it was using the
same axis for the ‘other’ size as for the ‘main’ size. This was
causing the inspector to report the tallest property inspector as its
width which would make it very wide when an entity with a text
component was selected.
shell: Restore the original GLib poll function after running the loop

Otherwise if the loop is restarted it will try to refetch the original
poll function but instead it will just receive the wrapper again. When
the wrapper is later run it will hit an infinite recursion and crash.