Set non-zero exit code in runcases.js on fail.
Set up testing with Mocha. Wrap runcases.

This clears the way for testing with Mocha for things that the Tern test
framework does not cover (like file management).
Track reasons and visibilities for types.

Do not attempt to load types from automatically-loaded files that are private to
that file, since the type is not accessible from any file that was directly
added. This begins work on minimal requirements loading #22.
Load a minimal set of required types. Close #22.

Use the visibility level of type usages in included files combined with
the level of access the currently opened set of files has to each
included file in order to defer loading types which are not visible from
a currently-opened file. When the access level to a particular file
increases (because a new file is opened), execute any deferred requests
for newly-exposed types.

Add an option, noMinimalLoad, to disable this behavior and return to
loading all encountered types (largely for comparison/debugging
purposes).

The File class keeps track of access levels and deferred requests, and
the TypeManager maintains the set of files. The file management scheme
is tested in Mocha tests.