Remove couch_icu_driver module

couch_icu_driver is only used for binary strings comparison in
couch_ejson_compare when expression depth becomes greater than 10.

The logic for string comparison is identical to what couch_ejson_compare uses,
so opt to just use couch_ejson_compare instead of keeping a whole other binary
collation driver around.

To avoid a possible infinite loop if couch_ejson_compare nif fails to
load, throw a nif loading error as is common for nif modules.

To avoid another case of a possible infinite retry from of badarg
generated by max depth, and/or an actual bad ejson term, use a
specific max depth error so we don't have to guess when we catch it
and retry term traversal in erlang.

There was another uncodumented case when badarg was thrown besides max
depth or an invalid arg. It was when a prop value was compared with
any other supported type. In erlang it would be handled in these
clauses:

```
   less_erl({A},{B}) when is_list(A), is_list(B) -> less_props(A,B);
   less_erl({A},_) when is_list(A)               -> -1;
   less_erl(_,{B}) when is_list(B)               -> 1.
```

However, in C we threw a badarg for the last two clauses and relied on
erlang to do all the work. This case was a potential performance issue
as well since that is a common comparison for mango where we may
compare keys against the max json object value (<<255,255,255,255>>).

Add a few property tests in order to validate collation behavior. The two main
ones are:

  1) Given an expected sort order of some test values, assert that both the
     erlang and nif collators would correctly order any of those test values.

  2) In general, the nif collator would sort any json the same way as the
     erlang one.
11 files changed