state modification declaration

Added a `state` section to block declaration api.
It supports 2 types of notation:
 - function, that should return an object to merge to the `context.state`
```
function(result, context) {
    // return object here
}
```
 - jresult object, that describes a patch to merge to `context.state`
```
{
    id: '.id',
    content: '.data'
}
```