Remove vlog file if bootstrap, syncDir or mmap fails (#1434)
Remove vlog file if bootstrap, syncDir or mmap fails (#1434)

The createVlogFile function creates a new vlog file. The function apart
from creating a new file, bootstraps it, syncs it to the disk, and mmaps it.

If any of the three operations fail, we will end up with a file on the
disk but the vlog.maxFid will not be updated.

On the next attempt to create the vlog files, we will get a "File
already exists" error. This commit fixes this issue by removing the file
if createVlogFile encounters any error.

Fixes DGRAPH-1930
dgraph-io/badger,dgraph-io/badger