Moved child embedding logic to task.toString method

Moved the child embedding logic to task.toString method in order to guarantee that if a rendered child task appears in its parent's rendered data, then it is labeled as embedded. Currently this logic is in the _render method, which is too early since this method can be called for a parent before its child task is rendered, but the child task may be rendered right before the parent's view is rendered. This results in the child actually being embedded in its parent's view, but never being marked as embedded. The consequence is that the child is serialized and pushed when its already embedded in its parent.