Previous nav walker resulted in an error when no menu is set. This fix supports supplementary classes i.e. nav-header nav-header-blue. N.B. Bootstrap classes (nav-header, divider, divider-vertical) must be added first.
Considering the nav customization/cleanup code is fairly involved and important, it shouldn't be hidden in the middle of cleanup.php