Clean up cocoa input event handling.

The vtkCocoaGLView class was full of copy/paste duplication.  Common code
has now been consolidated.  Also, the loops for handling mouse drag events
have been removed, because they caused events to be handled out of order.

Change-Id: I23c521b149bc29ec0597ef4fb9170a21b0fc0457
Interpret OS X Command key as Ctrl instead of Alt.

After this change, VTK apps that map the Ctrl modifier to actions
will be more intuitive on OS X, since OS X users use the Command
key the same way that Windows and Linux users use the Ctrl key.

Change-Id: Iee77d7ba2541276ddf164c708bf18be2601eed05
Initialize interactor in Start() if not done yet.

The vtkXRenderWindowInteractor calls Initialize() from Start() if
the interactor isn't initialized yet, so it seems that the Cocoa
interactor should do the same.

My main reason for this patch is that I have often moved VTK apps from
Linux to OS X, which then refused to run because they called Start()
without first calling Initialize().

Change-Id: I043fc544e0f1cec4139a4e962aaccf3cce311d45
Exit the Cocoa event loop when the window closes.

This is to match the behavior on other operating systems.  If the
native window was originally created by VTK (and not merely attached
to VTK), then when the user closes it, the interactor's Start()
method returns.

Without this behavior, basic interactor-based VTK scripts and programs
will simply hang when the window is closed.

Change-Id: I900acda4dc2f98999615be7a3715716c64bc49b2
Readability improvements to vtkCocoaGLView event code.

Change-Id: Icaafa2244ed58ec36987fdf1d34d88fadef03c17
Merge topic 'cocoa-event-cleanup' into master

0d306476 Readability improvements to vtkCocoaGLView event code.
723ec489 Exit the Cocoa event loop when the window closes.
59850c7c Initialize interactor in Start() if not done yet.
e27035d8 Interpret OS X Command key as Ctrl instead of Alt.
9a2c2017 Clean up cocoa input event handling.