Remove _afterOtApply

PR is based on `test_doc` branch. Only the last commit is the refactoring.

Moving all the code of `_afterOtApply` into `_otApply` only affects `_submitOpData`
There it changes only two things:
* The `opData` passed to `_otApply` now has type and callback set.
* When calling `_otApply` the `opData` is already on the `pendingData` stack.

In the long run it makes the code easier to maintain and understand.