index: Add equality methods (equal, deepEqual, etc.)

Closes #5.