fix a small algorythmic bug introduced during optimization.
use rebalance macros
fix position of TR_TREE_FIND call
small fix
ignore generated config file
don't replace tree nodes on insert but return the existing one. Note that this is different from the behaviour of tsearch which is the POSIX equivalent of this function, but in various situations it is much more handy.