 Fix transaction too big issue in restore  (#957)
 Fix transaction too big issue in restore  (#957)

When restore happens, we bunch entries together and perform batch
write. The existing implementation would batch 1000 entries. The batch
of 1000 entries can overflow the transactional limits in certain
circumstances (eg: when the table size is too small). This commit fixes the
issue. We flush the entries once the batch reaches its max capacity.
dgraph-io/badger,dgraph-io/badger