Add specific test rules for eslint.

As tests in mocha syntax tend to be more deeply nested (due to the
structure of describe etc.) this increases the maximal nesting
setting. Additionally this takes care of unused expressions (as
they are valid for chai e.g. in expect(foo).to.be.undefined) and
adds a rule that checks for e.g. it.only - the only should be
removed before tests are checked in to avoid that only these
tests run.
Fix missing semicolons.
Fix syntax error which causes redeclaration of a variable.
Don't assign a variable that is never used.
Fix config test expected error message.
Remove explicte undefined.
Remove unused var.
Extract function for checking for whitespaces in db configuration.