Refresh catalog only on relevant errors

Fixes #2846.  Fixes #2847. Fixes #2979.

Errors in the build process that could be fixed by refreshing the
catalog now cause the catalog to refresh, assuming we have not already
refreshed it recently and that we are not offline.

These commands now don't need to refresh at startup: remove, run, debug,
create, build, bundle, deploy, test-packages, rebuild, and self-test

It should be OK for create to throw SpringboardToLatestRelease even
without refreshing, since release.latestKnown is still something we know
about.
Use setImmediate instead of setTimeout for yields

It's faster and still lets IO and signals through.
Tweaks to StatusPoller

- Lower STATUS_INTERVAL_MS from 500 to 50. Note that we were effectively
  doing 150 or 100 anyway: the _pollFiber was polling every 100, and the
  nudged _throttledStatusPoll was actually throttling at the default of
  150, not 500, because the Throttled constructor was being invoked
  incorrectly (without the named 'interval' option).

- Use the same throttler for _pollFiber and nudge.
Nudge console for every compiled source file

This will refresh the status bar more often and make the build tool more
responsive to signals.

Now that yield uses setImmediate, this has minimal effect on
performance.
Upgrade esprima and escope
Don't make unnecessary cordova unibuild for app

Start on #3274.  Since we don't cache app isopacks to disk, we don't
have to worry about invalidating this.
Factor out almost all fs. and path. calls in the tool

This will be useful when we want to be smart with windows file paths later
Also, all of the file calls are asynchronous with fibers now, which comes with
many benefits.

This is a combination of 23 commits. Original messages:
Wrap a large number of fs calls inside files.*

Convert a few more fs calls to files.*

More moving fs.* to files

Implement read/write streams and open/read/close

Get rid of fs from auth.js

Remove fs and unused imports from catalog-local and catalog-remote

Remove unused imports from catalog.js

Replace a whole lot of fs calls

Fix error

Migrate a lot more fs. calls to files.

Add a temporary symlink method

Convert old test to files.*

Use files.pathX instead of path.x everywhere

Replace path.x to files.pathX in tests

Small fixes to files.js and one rename

Make cleanup run in a fiber

Make wrapping functions take function name in case we need it

Add some timeouts and stuff to HCP tests

wrapFsFunc also makes a sync version of the function

Sometimes you just don't want to yield!

Make sure JsImage readFromDisk doesn't yield

Remove unused imports from npm test

Change order of test now that some things don't yield

Fix missing files import, and add a debug error printout
Replace rm_recursive with a modified rimraf
Reimplement files.rename with the retry logic for Windows
Use isopack metadata to find existing builds
Factor out making latest meteor "symlink"
Factor out the symlink dance into _saveIsopack
Factor out symlinking to meteor tool in selftest and tropohouse
Some reorganization of files.js
Add function to call Npm, special case for Windows

Conflicts:
	tools/meteor-npm.js
Lookup npm.cmd instead of npm on Windows
Replace process.env.HOME with files.getHomeDir()

Conflicts:
	tools/commands-cordova.js
	tools/config.js
	tools/files.js
	tools/selftest.js
	tools/warehouse.js
Make carriage return portable

In unix we can just use '\r';
In Windows the easiest way is to print a lot of '\b';
Remove extra console.log
Throw an error when we can't build an arch

Instead of failing silently