Rework text block state bitmask to give more room to the fold level

Now we may have at most 1024 different fold levels which is more than enought even for complex data structure stored in json files.