implement repetition/definition levels; fix null value handing in plain encoding