Fix undeclared variable warnings.
Update consumers to mozIAsyncLivemarks API change.

mozIAsyncLivemarks.getLivemark() has been changed to return a promise,
using a callback has been deprecated.
Fix errors: "can't access let declaration before initialization"

This has been caused by introduction of ECMAScript 6 "temporal
dead zones", see bug 1001090.
Fix "assignment to undeclared variable" error.