Replaces this component with another. The replacing component must have the same component id as this component. This method serves as a shortcut to
this.getParent().replace(replacement)
and provides a better context for errors.
Usage: component = component.replaceWith(replacement);
@since 1.2.1
@param replacement component to replace this one
@return the component which replaced this one