Moved add() code to avl_add()

As the code is not that complex anymore, the add() function body was
moved to  the avl_add() function with this commit.
Added missing data insertion
Remove element_with_hash() helper function

The functionality of element_with_hash() is provided by avl_find(), so
use this function instead.