fix bug in Menu.removeMenu() for trees of menus
add example of selecting the audio device from a menu
cleanup extra debug
Merge pull request #2474 from ZappoMan/js_prefs

Add a JS example for selecting the input/output audio devices from a menu