I have just discovered how to do this and I figured I'd post it incase someone else is looking for help.
In initialise(), lines 1114-1123 of /lib/navigationlib.php, Moodle searches /local for plugins that extend the navigation menu. If it finds one, it passes a $global_navigation object. So here's what you do:
1) Create the directory /wwwroot/local/myplugin
2) Create a new file called "lib.php" in the directory.
3) Moodle looks for a function name that matches "myplugin" + "_extends_navigation". In our case, add the following function to your file:
function myplugin_extends_navigation(global_navigation $navigation) {
$nodeFoo = $navigation->add('Foo');
$nodeBar = $nodeFoo->add('Bar');
}
Reload the main page and you should now see this: