section=0 to top and trade xml for json

Move detection of all parameters that are in content0 to top of the page so that they can be parsed before polluting a page with unusable |Archive links.  Also, trade in last of xml for json.  Will work on converting the $.get() API queries to use mw.API().get() instead.  Want to work on the pre-parsing more first.