Major refactoring, new types, new everything

Since now on types will be serializable with an ability to dispatch
via socket.
Add keyrange type
Update aggregations
Update folds
Fix tests
Refactor serialization to new Decode type