Fixes and improvements

These include:
- use calloc instead of (malloc + memset)
- msynpred condition must be evaluated as last one in conjunction list. This bug made Cpp target much slower than Java one.
- member variables initialization fixes
- error reporting fixes
- some tests were added

Note: Cpp target still has memory leaks. test004 is reproducible example.