Clean up list of scripts when reconnecting. (see #10468)
Clear the menus.
Merge pull request #1692 from jburel/rebased/dev_4_4/script-refresh

Script refresh (rebased onto dev_4_4)