Palette menu2

From the 1st PR I changed the following:

- better inheritance
- emit a signal when an item of the menu is selected (this improves Memorize-web code)
- more tests