Improve error-handling by avoiding use of the promise .done() method.

Creating a new deferred and then returning deferred.promise asynchronously
is somewhat of an antipattern: it breaks the call chain so thrown errors
don't get properly reported.  You can work around this by adding an
`otherwise` handler on the orphaned promise to call `deferred.reject(err)`
but it's better just to (eventually) return `deferred.promise` as part of
the normal promise chain.

Change-Id: I09b882c1b7130cc44661d2589fdf82eeef5d422d
CJK support using the xeCJK package.

Getting xeCJK to play nicely with polyglossia is somewhat fraught. See:
http://tex.stackexchange.com/questions/45331/combining-chinese-japanese-and-korean-text-with-xecjk
http://tex.stackexchange.com/questions/36878/xecjk-messes-with-punctuation

Updated gammalatex so that we can set the TEXINPUTS path.  See:
https://github.com/gammasoft/latex/pull/3

Added some CJK fonts to the README and travis config.

Note that Parsoid doesn't support LanguageConverter yet, so we can't
properly handle Simplified -vs- Traditional Chinese.  We'll revisit
that once the Parsoid support is in place
(https://bugzilla.wikimedia.org/show_bug.cgi?id=41716).

Change-Id: Icd770deae3a8307721c1417754285754e498a2c2
Fix TeX "pool overflow" with very long filenames.

Add test case taken from the jawiki.

Change-Id: Iba92c5cd6a275859a38b7015440737751d2a5a36