Fixed: CPAlert sheet crash.

Without this fix, CPAlert windows would not finish closing before sending the `alertDidEnd:returnCode:` delegate message. This would lead to a crash if the delegate method tried to open a new sheet.

This fix makes sure to fully order out the alert sheet before sending the delegate message.
Fixed: CPAlert was a CPView.

Before this fix, CPAlert subclassed CPView, causing an API mismatch with Cocoa and exposing unexpected methods in the public API which made no sense for a CPAlert such as autoresizing masks. It also lead to CPAlert mistakingly shadowing _window from its CPView superclass.

This fix makes CPAlert inherit from CPObject as it should. The theming, which needs to be applied to a view, was moved to an internal view.
Fixup: previous fix undid penultimate fix.
Commit message guidelines.
Optimised images
Merge pull request #1708 from imageoptimiser/optimised-images

Optimise images (94 KB reduction)
Fixed: CPPanel could not always become the key window.

Without this fix, `CPPanel` followed the same rules as `CPWindow` with regards to becoming the key window. But `CPPanel` is supposed to always be willing to become the key window, as stated in its documentation.

This change makes `CPPanel` always return `YES` for `canBecomeKeyWindow`.
Support for resizing windows on all sides
Finished full window resize support

- The main run loop resets the cursor if it falls outside of all windows during a mouse move.
- Added cursors supported by CSS that are not in NSCursor.
- Code cleanup in CPCursor.
- Cursors now indicate available resize directions if there is a window min/max size.
- Reduced slop to 3, what it is in Cocoa.
- Added a second non-min/max window to the demo.
Constrain window resize to usable area of platform window.
Optimisation.
Fix bug in CPSegmentedControl not reducing his size when removing segments
Add manual test for CPSegmentedControl
Window resize fixes

- Track mouse exit from window resize rect instead of unconditionally setting arrow cursor.
- Don't show the resize cursors for full platform windows.
- Show the resize down cursor if the top of a window is being resized and it has reached the bottom of the menubar.
- Make windows in CPToolbarTest resizable to test resizing behavior with toolbars.
- Added a full platform window and menubar to the test app.
Fix CPWindow -canBecomeKeyWindow and -canBecomeMainWindow to match Cocoa behavior (and misleading documentation)

Minor code formatting cleanup as well
Improved support for converting CSS properties to their JS equivalent in CPBrowserStyleProperty

For example, the following CSS property names all resolve to the same correct JS equivalent for the current browser:

 * CPBrowserStyleProperty('TransformOrigin') -> 'WebkitTransformOrigin'
 * CPBrowserStyleProperty('transform-origin') -> 'WebkitTransformOrigin'
Merge pull request #1713 from milestinsley/CPBrowserStyleProperty-fix

Improved support for converting CSS properties to their JS equivalent in CPBrowserStyleProperty
Updated CPBrowserCSSProperty to support camel cased style property names and convert them into valid browser-aware CSS properties.
Improved the reliability of CPBrowserCSSProperty by checking for the browser prefix *before* hyphenating the camel-cased string.

 This has the added benefit of ignoring unknown/unsupported prefixes, providing the property itself is camel-cased.

For example:

"LinearBackground" -> "linear-background"
"Linear-Background" -> "linear-background"
"linear-background" -> "linear-background"
"fooLinearBackground" -> "linear-background"

and

"WebkitLinearBackground" -> "-webkit-linear-background"
"MozLinearBackground" -> "-moz-linear-background"
etc..
Merge pull request #1713 from milestinsley/CPBrowserStyleProperty-fix

Improved support for converting CSS properties to their JS equivalent in CPBrowserStyleProperty