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`.
Fix bug in CPSegmentedControl not reducing his size when removing segments
Add manual test for CPSegmentedControl
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
Full platform windows and popovers can become main
Fix a bug where CPURL was not encoding self._baseURL and self._string
Merge remote-tracking branch 'upstream/master' into objj_compiler2

Conflicts:
	AppKit/CPWindow/CPWindow.j