Limit the size of batched operations.

Clear and putAll are using a Writebatch. These will overflow on very
large collections.

Inserted an arbitrary limit (1000) on the batch size to preserve memory
and keep the application running even on very large sets.

Change-Id: Iaffb9a29e99a545d84ea34274543bf3c602a9a5d
Fix: testTailMapClearThrough.

We have to override the clear method in order
to keep a call to clear within the bounds of
submap.