JSON-based API proposal

The goal of all theese changes is to make existing API a bit more flexible. Now we can allow an enduser to evaluate any kind of scripts and to recieve any kind of results, without any standartization. It now feels like using a command line interpreter.
However, we need some refactoring to be performed on the API.m file to make it all work as expected.