API: Add attributes argument for CMSMenuItem for external links

Currently help menu item is the only external link in the CMS and the ability for it to work is hardcoded in the template. This request makes the target attribute definable by CMSMenu::add_link().

Adds documentation for how to add a basic external link to the CMS as well as a test.

Fixes the javascript to avoid running when target is an external window.

Corrects the phpdoc syntax