Create test menu as the very first menu.

This fix is just an attempt to fix #2917 based on my guess that menu tests failure on Mac is introduced by moving Debug menu to an extension.