Allow postEdit hook to be triggered asynchronously

This is required by VisualEditor as it doesn't do a page reload
after a save. So we need it to keep listening even if the
initial config and cookie data doesn't show an edit was just
made.

* Allow the message to be overriden, as VE uses its own.
* Using jQuery instead of direct DOM interaction with `div` (and
  renamed to $div accordingly).
* Moved click handler from postedit-close to postedit-container.

Bug: 39632
Change-Id: I778b18bc051c51de355e122d8d4517b5a651ed4c
Merge "Allow postEdit hook to be triggered asynchronously"