Move document sidebar entries extraction to document.View
This way other modules can benefit from the same logic. Also make use
of the sidebar.getSidebarMenu method so that getMenusForScope is no
longer specific to full menu's.
Patch by: Sverre Rabbelier
A list of bugs is available in the Google App Engine SDK project on Google Code.
Please visit http://code.google.com/p/googleappengine for more details.