Generic red-black tree library (by Julienne Walker).