Bug 868696 - Emit DocumentLocalize only once. r=gandalf

When the context is ready for the first time:

  - context emits 'ready',
  - document emits 'DocumentLocalized'

On language switch (via Context::registerLocales):

  - context emits 'ready'.

For HTML bindings, if you need to execute code on every retranslation caused
by a language switch, you still can with:

   document.l10n.addEventListener('ready');

Ideally though, you should use Context::localize instead which has the
additional benfit of executing the callback passed to it on globals' changes as
well.

This commit also fixes a regression introduced by bug 868677:
Context::registerLocales was calling freeze without passing `this`.