AVL: Fix issues with balancing tree in case of double pivots

Signed-off-by: Uladzislau Rezki <urezki@gmail.com>
Makefile for libtree

Signed-off-by: Uladzislau Rezki <urezki@gmail.com>