fixed segfault for too big shapes, make shape collection filesize adaptive
fixed tests
added tests for big documents
fixed client-side tests