When dealing with multibyte strings, the substring limit of 4000 **chars** is not correct.
We need to apply a limit of 4000 **bytes** to both VARCHAR2 and to CLOB data types.
This means we need to have a function to calculate lenght of CLOB in bytes.
This is now added and all the conversions/trimming/string-splitting is done using the string length in **bytes**
Additionally, a different approach (with sequences) was introduced into output buffers to avoid the sometime occurring PK violation on the output buffer tables.
The new approach may add a but overhead on reading from / saving into buffer, but will definitely address the threat of PK errors.
Resolves #1254
Resolves #1128
Replaced all regexp ranges with posix representations to avoid NLS_SORT impact on regex behavior.