Make nav helper more friendly and filterable for plugins and themes.

Hi,

Currently, the navigation menu generated by the `nav` helper cannot be filtered - meaning that it's not possible to modify the default menu items or change their ordering without generating the whole thing yourself.

It would be helpful if all the menu items could be filtered. The attached code also cleans up how the HTML is generated to remove redundancy.