TableAdapter: supported NULL type argument and callable filter.

If a NULL is passed as $type argument to constructor

1. The 'type' prop MUST be set if a record is created.
2. Records of ANY type are returned and the 'type' key is set among other props.

The filter argument accepts the following values:

- array of regular expressions: retained the previous behaviour
- callable: a function returning a TRUE/FALSE value
- NULL value: filter disabled, return all rows from DB
ObjectsCollection widget: fixed empty collection rendering and nested widgets. Refs #2049
Selector JS widget (_renderDatasourceWidgetList): fixed checkbox/radio selected state.

The checkbox selection had failed on updateView event.

The "choice" CSS class is set by PHP implementation but was missing
after DataSource update. This fix set the class properly when data
source is updated.
XhtmlWidget (labeledControlTag): new attributes labelWrapClass, labelWrapTag.

The two new attributes decide how the LABEL and control are wrapped.

- labelWrapTag (default DIV) is the HTML tag that wraps the
  control+LABEL

- labelWrapClass (default "labeled-control") is its CSS class
TableAdapter: accept also array of types.

This is a special filter that acts on the 'type' builtin prop: the
underlying database returns all records, but only those of the given
types are retained.

Old argument types are still accepted:

- NULL type: returns any record. It's equivalent to an empty $types
  array.

- string type: return the given type only. It's equivalent to a $types
  signleton.
Validator (isEmpty,notEmpty): support for Countable objects.

The PHP empty() construct returns FALSE with an empty
ArrayObject. This change fixes isEmpty() and notEmpty() when the value
is a Countable implementation.
TableAdapter: added flush() method to force load of data from DB.

This is required if cached values are invalidated by an external
database change.
Translator (translate): use the same placeholder syntax of JS replacePlaceholders().
SessionDatabase (delProp): fix not-existing keys.
CompositeController (prepareNextViewOptimized): extract action name from path head.
Js UI: use history.pushState() API for history navigation.
Button widget: implemented dynamic label updates.
TextLabel JS widget: ensure template is not null.
SessionDatabase: allow deletion of non-existent keys.