Bug 908168 - make perf: Measure the time it takes to setup a ctx. r=gandalf
Bug 802850 - Debug, error and warning strategy. r=gandalf

The code changes are relatively few, most of the patch are tests for locale
fallback and accompanying events.

Below is the breakdown of the errors and warnings that we emit and log in the
console by default.  This is in line with Gandalf's idea to log broken
translations as errors and missing translations as warnings.  The reason is
that a developer or a localizer will likely want to see when they've broken an
entity (syntax error, reference error) as their intent was to have that entity
show up.  OTOH, if an entity is missing from the resource completely, then we
only emit a warning which can be filtered nicely in the console.  This way, you
can start localizing with a small number of entities in your locale and we will
only show you errors if what you typed in the resource file is wrong.

 - `error` - fired when an error occurs which prevents the `Context` instance
   from working correctly or when the existing translations are buggy.  The
   error object is passed as the first argument to `callback`.  These errors
   include:

   - native JavaScript errors (`TypeError`, `ReferenceError` etc.) (this might
     get changed by bug 869016),

   - `Context.RuntimeError`, when an entity is missing or broken in all
     supported locales;  in this case, L20n will show the the best available
     fallback of the requested entity in the UI:  the source string as found in
     the resource, or the identifier.

   - `Context.TranslationError`, when the translation is present but broken
     in one of supported locales;  the `Context` instance will try to retrieve
     a fallback translation from the next locale in the fallback chain,

   - `Parser.Error`, when L20n is unable to parse the syntax of a resource;
     this might result in entities being broken which in turn can lead to above
     error being emitted.

 - `warning` - fired when a less serious error occurs from which the `Context`
   instance can recover gracefully and try to fetch a translations from
   a fallback locale.  The error object is passed as the first argument to
   `callback` and can be one of the following:

   - `Context.Error`, when there are problems with setting up resources (e.g.
     a 404 error when fetching a resource file, or recursive `import`
     statements in resource files),

   - `Context.TranslationError`, when there is a missing translation
     in one of supported locales;  the `Context` instance will try to retrieve
     a fallback translation from the next locale in the fallback chain,

   - `Compiler.Error`, when L20n is unable to evaluate an entity to a string;
     there are two types of errors in this category: `Compiler.ValueError`,
     when L20n can still try to use the literal source string of the entity as
     fallback, and `Compiler.IndexError` otherwise.
Bug 869016 - Remove promises. r=gandalf
switch from window to this
properties compiler
properties parser
add webl10n target
add getSubDictionary logic
add getEntities needed for fullDict
add basic translation
add getEntities
use onreadystatechange
remove getEntities, expose Locale and Resource
use onreadystatechange in loadSync and use readyState == 4
reorganize webL10n bindings not to use ctx on server side at all
simplify get() in translateNode
Release 1.0.0 beta 4
parse ComplexString and work with placeables
add args support to API/compiler
add args support to compiler