Revised pre-loading and added tests

Added a significant number of unit tests for loading, including failover
loading tests.
Using the new "Promises, Promises..." 1.1 distribution and setImmediate
functionality, if it's available.
Revised the hackish cache-load functionality for older browsers to make
it a best-effort convenience. It now loads all potential sources, but
doesn't wait for them to load before actually trying to add the
resources. This is a much simpler scenario and fits the overall goal -
older browsers can try to pre-load things, but we won't wait around in
case it fails.