ucpf::utils::ubb: import ternary search tree code from boost::spirit

Signed-off-by: Alex Dubov <oakad@yahoo.com>