use !isOpen() and bail out early in all methods

There were different ways of checking the state of the db before actually doing something:

Check if open and do something, else bail:
```js
if (isOpen()) {
  // Do stuff
} else {
  // Bail
}
```

Check if closed and bail, else do something:
```js
if (isClosed()) {
  // Bail
}
// Do stuff
```

I chose the second one for all methods, but replaced `isClosed()` with `!isOpen()`. The reasons for this are:

- Consistency
- Get rid of a level of indentation
- No longer internally dependent of the `isClosed()` method ->
  Easier to remove if we so choose.