add operator +, ==, and != to Cursor classes
Summary:
Add operator+, which returns a new Cursor pointing the specified number
of bytes ahead. Cursor already implemented a += operator.
Also add == and != operators for checking to see if two cursors are
pointing to the same location. Note that some derived cursor classes do
contain additional state, and we don't consider that state when
comparing for equality. For instance, two Appenders pointing to the
same location will compare as equal, even if they are configured with
different growth parameters. It seems like this is the behavior most
users will expect, but let me know if you have concerns about this.
Test Plan: Updated the unit tests to exercise the new operators.
Reviewed By: davejwatson@fb.com
FB internal diff:
D1183537