refactor(util): make 'util/test.h' the first include

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
refactor(deep_copy): simplify deep_copy implementation, and move unit test to separate file

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
test(trace): add unit test for trace module

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
test(exception): add new tests exception and parser_exception

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
test(bit_tricks): add tests for log2
refactor(debug): improve lean_unreachable(), now we can avoid 'fake' return statements

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
feat(expr_lt): improve expr_lt performance by using hash codes, and add more tests

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
test(list): add tests for improving code coverage

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
refactor(kernel): simplify expr_eq

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
test(splay_map): add tests for improving code coverage

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
fix(memory): disable problematic test when tcmalloc is used

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
fix(memory): increase memory counters by the actual size of reallocated memory

On OSX, we had a test failure on memory module. The problem was in
the realloc function (line 38):

    void * realloc(void * ptr, size_t sz) {
        size_t old_sz = malloc_size(ptr);
        g_global_memory.dec(old_sz);
        g_global_memory.inc(sz);
        g_thread_memory.dec(old_sz);
        g_thread_memory.inc(sz);
        void * r = realloc_core(ptr, sz);
        if (r || sz == 0)
            return r;
        else
            ...

The size of r could be bigger than sz. For instance,

    |ptr| = 40 but |r| = 48

In the current code, here we only increase counters by 40.
But later when we free it, we decrease them by 48, and this
caused the problem, underflow of an unsigned counter in
g_global_memory.