This extracts a few helper methods in
UserMenuLinks widget, so that link definitions and rendering can be easily extended by plugins and/or themes. (Only bookmarks and messages are extracted as I only need the two, but I am happy to extract the rest if this is the preferred design)
Let me know if you have other APIs in mind! Thanks.