Add OS X menu items for Preferences and About
OS X menus and menu items

Most of these already work in this commit, but not all.
Some need some more complicated handlers, for which I will make a separate commit for clarity.
Many of the simple ones use the existing handlers for the toolbar buttons, though I have also added several new simple handlers here.

I have extended the SetToolbarItemState function to also set the state of the corresponding menu item, and have used it extensively to replace existing places where the toolbar item state was previously set manually.
OS X menu handlers for mark, route, and measure items

These involved wrapping some of the existing code in chcanv.cpp in function wrappers so I could call it from chart1.cpp.
OS X menu handler for Help menu item

I moved the code to load the external help from about.cpp to chart1.cpp so it is globally available, and I call it from the chart1.cpp menus and also from the original location in about.cpp
Change input com port filter to not put messages on the internal bus if they are filtered out.
Populate route and track segment lengths during load.
Fix disappearing toolbar item bug

Introducing new constants amongst those which define the existing toolbar items triggered a bug in the way toolbar button visibility is calculated.
Fixed by defining new constants AFTER the old ones.
Explanatory comments added.
Add Magnetic COG to the the Dashboard. This has been added to make the output more sensible when using the new Magnetic bearings for route navigation
Add Magnetic COG to the the Dashboard. This has been added to make the output more sensible when using the new Magnetic bearings for route navigation
Added new boolean to configuration file, LegacyInputCOMPortFilterBehaviour. Default is false or "0" in config file. This means the new behaviour will occur, i.e. input messages that are filtered will be dropped.

Changed output to NMEA debug window to show red messages for those on input that have been filtered and dropped. Changed the legend to cover this.
Merge pull request #180 from jongough/magnetic-COG

Magnetic cog
Modified definition of g_b_legacy_input_filter_behaviour to have a comment to allow commiting the change and creating a diff file without whitespace changes
Updated message window to show DARK RED for messaged dropped from input data stream. Added legend for RED messages
Change input com port filter to not put messages on the internal bus if they are filtered out.
Added new boolean to configuration file, LegacyInputCOMPortFilterBehaviour. Default is false or "0" in config file. This means the new behaviour will occur, i.e. input messages that are filtered will be dropped.
Changed output to NMEA debug window to show red messages for those on input that have been filtered and dropped. Changed the legend to cover this.
Updated message window to show DARK RED for messaged dropped from input data stream. Added legend for RED messages
Changed the APB message to allow different precision on the bearings used. The precision is selectable from the "Settings/Connections" window and is maintained in the conf file.

Hopefully no whitespace stuff
Add 'C', 'M', and 'Q' shortcuts (for all platforms) to parallel 'F5', 'F4', and 'F9'
Add OS X menu for AIS, with target visibility toggle and alarm options

Also abstracted the code which updates the menu item check values into a method so that ti can be called when updating options, as well as at load.
This is necessary in case the AIS options change, and potentially for future options too.
Update shortcuts in context menu, and add Shift-Cmd-Z for undo on OS X

- Changes the right-click menu items to use the new single-letter hotkeys instead of the old F-keys. (Both types of hotkey still work, this only changes the labels.)
- Removes some instances of ifndef __WXOSX___ which needlessly prevented some shortcuts showing on OS X
- Adds a new shortcut for undo, Shift-Cmd-Z, which is the standard on OS X. Both this and Ctrl-Y will now work on all platforms.
New XTE autopilot message
Updates to handle XTE messages