Extract main menu generation into NavbarGenerator.

* Introduce a class for menu generation. Menu sections, menu items.
* Simplify navbar view.
* Define navbar in a declarative way.
* Remove redundant constanst.