RIVER-416: Improved robustness of Levels serialization

git-svn-id: https://svn.apache.org/repos/asf/river/jtsk/trunk@1455692 13f79535-47bb-0310-9956-ffa450edef68