APIDump: Split long code into functions.
APIDump: Do not list empty Constants or Functions sections.

Also implemented writing inherited constants.
APIDump: Fixed offline JS.

This time it's really offline :)