Add split_uid function to sqlite.

Syntax:
SPLIT_UID('name'|'origin', string)

Use:
This function is used to split unique_id to its components:

SPLIT_UID('name', 'name~origin') returns 'name'
SPLIT_UID('origin', 'name~origin') returns 'origin'

If an input string is not in format name~origin, then the full string is
returned.
Another speedup by using of covering index.