rb_tree: insertion prelim implementation

implement code for insertion operation.

Add helper functions and macros for rotation.

Signed-off-by: Prashant Malani <p.malani@gmail.com>
rb_tree: Fine tune code to account for some edge cases

If after performing the rotations, the current node doesn't
have any grandparent, then end the insertion.

Also verify the implementation with some sample inputs.

Signed-off-by: Prashant Malani <p.malani@gmail.com>