Fix a refcounting bug & menu index bug
Fix a refcounting bug & menu index bug

The recent separator-skipping change exposed a double release
of cocoa_items, and while working on it I noticed a couple of
paths where last_item wasn't updated, which might result in
separators being skipped incorrectly.

GNOME/gtk-mac-integration,sharoonthomas/gtk-mac-integration,sharoonthomas/gtk-mac-integration,GNOME/gtk-mac-integration,sharoonthomas/gtk-mac-integration,jralls/gtk-mac-integration,GNOME/gtk-mac-integration,jralls/gtk-mac-integration,sharoonthomas/gtk-mac-integration,jralls/gtk-mac-integration,sharoonthomas/gtk-mac-integration