Method `ensureError` works incorrectly for errors inherited from Terror

`ensureError` should return instance of the owning class.

For example:
```javascript
try {
    throw new Terror('foo');
} catch(err) {
   console.log(MyError.ensureError(err) instanceof MyError); // false, but why?
}
```