rb_tree unit tests
fix 32-bit compile error
fix assert fit_in_ubytes

Remember: (v >> s) is undefined if s >= sizeof(v)*8