Backport build-in menu to nw0.8

1. All code are from mac branch.
2.Works as nw v0.9.