Fix #1184: Add missing argument to .apply()

The Javascript .apply() method takes two arguments: A context argument and an array of values. In CPWebScriptObject callWebScriptMethod:withArguments, only an array of arguments was passed to the .apply() method.

This fix inserts `this` as the first argument, and the array of arguments as the second. This has been converted to a pull request from the original issue (#1184)

The original issue also suggested a fix for handling namespaces, which are not incorporated in this patch.
Change `this` to `_window` in apply()
Fixed: table cells were not initialized from xib settings

This is a second attempt to fix the problems addressed by 69bbe627a9e10fc78af3cda2b8c7b4a821eed8ed.

Because table cell classes needed to use the same initialization code as the NS_initWithCoder methods, it was necessary to refactor the initialization code into separate NS_initWithCell methods and call them separately from NS_initWithCoder.
Fixed: invalid menu item validator was not checked properly

Previously, if CPApplication -targetForAction:to:from: returned nil, no check was done to see if that failed because there was no action or no valid target. If the item had no item, no target, and to action binding, it would be left enabled, which was incorrect.

This commit fixes the validation to disable the item if targetForAction:to:from: returns nil and the item has an action or target.
Fixed: CPDictionary setObject: forKey: will log deprecated warning when passing nil object or key.
This should be replaced by throwing exception after release of next stable version. Code included for this.
Fixed: Do not setObject: forKey: when object or key is nil
Define navigator.userAgent as another ugly Rhino fix
Travis CI: Use new $TRAVIS_BUILD_DIR env-variable

Before this fix: environment variables defined `.travis.yml` were still
dependant of internal configuration of the travis worker virtual
machine. See also previous pull request #1728.

With this fix, `.travis.yml` is even more generic and portable.
Fixed: Handle deprecated setObject:forKey: calls with nil object on CPDictionary
Merge branch 'master' of https://github.com/cappuccino/cappuccino into cpdictionary_throw_on_nil
Merge pull request #1817 from gildegoma/travis-ci_use_build_dir_variable

Travis CI: Use new $TRAVIS_BUILD_DIR environment variable
fix for issue #1819 tableview infinate loop
Merge pull request #1820 from BlairDuncan/TableViewCursorInfinateLoopFix

fix for issue #1819 tableview infinate loop
Fix #357: Fix resizeWithOldSuperviewSize to work more like Cocoa

Without this fix, CPView's resizeWithOldSuperviewSize: would simply resize subviews at the rate of 1 pixel for every 2 pixel change.

This change introduces a new method of resizing views to a ratio of the size of the superview.

Patch contributed by @davidkhess
Merge pull request #1821 from ahankinson/fix-issue357

Fix #357: Fix resizeWithOldSuperviewSize to work more like Cocoa
New: - CPObject performSelector:withObject:afterDelay:.

Also - CPObject cancelPreviousPerformWithTarget: and other related methods.
Merge pull request #1810 from ahankinson/fix-issue1184

Fix #1184: Add missing argument to .apply()
Merge branch 'refs/heads/cpdictionary_throw_on_nil' into temp
Formatting, refactoring, use separate message for nil key
Fixed: Removed deprecated warning when creating CPDictionary with nil object