deps(go-datastore) update

This commit updates go-datastore in order to access new LevelDb Close()
method

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
refactor(errors) debugerror -> errors

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
feat(util) FileExists

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
fix(daemon) if lock file does not exist, then the lock is not acquired

@mappum @jbenet LGTU?

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
deps(eventlog) no need to augment Logger

allow framework to add level to log so level can be applied when using
text formatter

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
refactor(eventlog) use polite formatter as a direct dependency

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
fix(core) tear-down leveldb

@jbenet @whyrusleeping @mappum

If we permit initialization in `ipfs daemon`, then we must ensure that
the node instantiated in `ipfs init` (to create the welcome file) shuts
down and releases resources.

Kept running into "resource temporarily unavailable". Discovered that it
was our cousins Jeff and Sanjay over at LevelDB Ave.

go-datastore doesn't expose Close() so I extended the TsDs interface and
submitted a patch.

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
feat(eventlog) initialize event logger with silent defaults

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
debug(2/ipfs) make cmdDetails loggable

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)

Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
refactor(2/init) extract const

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)

Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
refactor(2/init) use util.FileExists

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)

Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
feat(2/init) expose init with defaults

will support daemon initialization

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

# TYPES
# feat
# fix
# docs
# style (formatting, missing semi colons, etc; no code change):
# refactor
# test (adding missing tests, refactoring tests; no production code change)
# chore (updating grunt tasks etc; no production code change)

Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
debug(core, datastore, daemon) wrap errors

@jbenet @whyrusleeping @mappum

very helpful for tracking down errors. the stack traces are only
shown when debug mode is visible. They function best when caught at the
source.

I propose we use this errors package as a drop-in replacement for
fmt.Errorf and errors.New in all of our code, and use errors.Wrap for
external errors as they emerge from others' libraries.

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

Signed-off-by: Brian Tiger Chow <brian.holderchow@gmail.com>
feat(2/daemon) --initialized

@jbenet

now, ipfs can be built and executed in one step:
```
docker run jbenet/go-ipfs daemon --initialized
```

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
feat(util) add datastore Closer Wrapper

@jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
docs(eventlog/formatter)

@jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
fix(2/daemon) initialized --> init

@jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
revert to debug error

@jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
doc(eventlog) init

@jbenet

yeah, these are just sane defaults

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>