Flatten roundtrip routes with promises

 * Also, moves Util.parse to mediawiki.parser.js as suggested in a TODO.

Change-Id: Ifaa085f5563c57c68d3b818a25fca3b369b16d6a