mediawiki.page.gallery.resize: Remove weird mw.hook call

This mw.hook has no place here, there's various things wrong
with it:

* Naming.
  We don't prefix event names with "mediawiki" nor the module
  name. This pattern does not exist and this being here makes
  understanding mw.hook by example harder and only adds to the
  confusion.

* Synchronous behaviour.
  Aside from the naming (details..), mw.hook simply doesn't do
  what the code is asking for here and exhibits behaviour the
  gallery relies on to to happen.
  By design, mw.hook is asynchronous and memorises the last call
  for new event handlers to allow modifying the last version of a
  particular interface. It's like document-ready, if you bind
  after the document is already ready, it's just to declare it
  needs the document to be ready. It's not for exactly when that
  happened, just that it happens after.

* Plurality.
  To make matters worse, aside from naming and asynchonisity,
  the gallery is also calling it in a loop, which is another
  violation of mw.hook's design. When something emits mw.hook,
  it means any previous state is no longer active (e.g. the user
  switched modes, or navigated to another page with AJAX, or
  closed the relevant dialog, or opened another one etc.).

Also removed some mw.log calls that seems to be left from
development. If these are important during regular usage, it should
probably throw an exception or use mw.log.warn instead.

Change-Id: Iefdfab26fcd24e3f9f8f3f2fc7f1fdba9f838a25
Merge "mediawiki.page.gallery.resize: Remove weird mw.hook call"