Tooltip: on close close only set title if empt. Fixed #8925 - Changes to title attribute are reverted on close

Ticket #8925 states that changes to the title attribute while the
tooltip is open are lost on tooltip close.

In the close function, the title attribute was always written if a
value was stored on open. It is possible the attribute has changed and
restoring the initial value may overwrite the current value.

If the value is empty or undefined as set in open, do not set the title
attribute.