Fixed: trancodeDataToDocument should also handle stdClass objects.

As some consumers will pass stdClass to trancodeDataToDocument which does not have toArray we could handle them as well (works only on public properties).