nsort sorts namespaces and pages together

When nsort sorting option is switched on, namespaces and pages on the same index level are sorted together.
I use it with msort option as well.
Original behaviour sorted namespaces first and then sorted pages were added.
Maybe new sorting option can be added for this mode.
I have not studied the code enough to answer, because PHP is not my prefferred language ;-)
These changes are what suits me in my case now...
Please feel free to make any modifications with better knowledge of the background.