Content translation/Publishing

Status
The translated article is in html at Special:CX. It is passed to CX Publishing API, which then contacts parsoid to get the wiki text for the given html. Finally the api creates the article in User namespace with contenttranslation tag.

The html in translation column has lot of annotations with segment spans. Before passing to parsoid all such wrapping segment spans are removed.

Story: https://wikimedia.mingle.thoughtworks.com/projects/language_engineering/cards/4135

TODO

 * 1) Paroid return a complete html for the article. but we are interested in the body part. we need to do the cleanup at server before segmentation
 * 2) Every page should have  to have the references applied properly
 * 3) How to handle templates missing in target wiki?