RFC 279: Newinstance with closures

This pull request implements xp-framework/rfc#279 and adds closure support to `newinstance`.

## Old

```php
$handler= newinstance('lang.reflect.InvocationHandler', array(), '{
  public $invocations= array();
  public function invoke($proxy, $method, $args) {
    $this->invocations[$method."_".sizeof($args)]= $args;
  }
}');
```

## New

```php
$handler= newinstance('lang.reflect.InvocationHandler', array(), array(
  'invocations' => array(),
  'invoke' => function($self, $proxy, $method, $args) {
    $self->invocations[$method.'_'.sizeof($args)]= $args;
  }
);
```