Rewritten to C, reorganizing to fir PGXN recommended structure (sql/,…
… src/) etc.
Thanks to rewriting to C it's much faster. The state is not kept in bytea but in an allocated memory (extended dynamically).