lib: fix implicit seqof encoding

Following schema encoding is broken:

[0] IMPLICIT SEQOF Attribute

Implicit tag is prepended to wrapping SEQ and to every element
inside it.

Implicit state should be reseted for SEQOF children
Fix nonegative integers with 80 bit set

Nonegative integers can have highest bit (0x80) which
makes them interpreted as negative numbers.

When encoding such integers, prepend 00 byte before first byte
to force positive number detection.