Fixed: CPNumber>>numberWithBool: breaks CPComparisonPredicate

Commit df2be92 breaks CPComparisonPredicate if one side of the comparison is a property which returns a BOOL.

CPPredicateParser parses literal BOOLs (YES/NO) into 0/1 using CPNumber>>numberWithBool:. CPComparisonPredicate however does not cast a BOOL from a property using numberWithBool:. E.g.

[[YES,NO] filteredArrayUsingPredicate:[CPPredicate predicateWithFormat:'self = YES']]
used to return [true], now it returns [].

This fix addresses the issue by "typecasting" the lhs/rhs values to numbers using CPNumber>>numberWithBool: if they are of type boolean.

Fixes #2028
Fixed: support for dates (CPDatePicker) in CPPredicateEditor

Before this commit, row templates and views belo,ging to them were copied via archiving/unarchiving.
This was causing problems when the view was not completely CPCoding compliant, like for CPDatePicker.

With this commit, template views use CPCopying (-copy method) when available.
Also added CPCopying for CPDatePicker as a category in CPPredicateEditor.

Test: in CPPredicateEditorTest, on the right panel, choose a keypath, operator, and select 'Dates' in the popup for the right expression.

Fixes #2041
Merge branch 'refactor-locale' into fix-CPNumber-numberWithBool
FIXED: Crash when clicking on an empty CPTableView with variable row height.

Previously, clicking anywhere in an empty CPTableView with variable row height was causing a crash due to the code trying to find the latest cached row height. This patch adds a check to ensure the last cached row height is not nil.
Merge pull request #2044 from krodelin/fix-CPNumber-numberWithBool

Fixed: CPNumber>>numberWithBool: breaks CPComparisonPredicate
Merge pull request #2054 from cacaodev/CPPredicateEditor-dates

Fixed: support for dates (CPDatePicker) in CPPredicateEditor