XWIKI-9970: Look at 'displayMainMenu' in edit mode

* The 'displayMainMenu' is now checked before loading the 'menuview.vm' in edit
mode
XWIKI-10020: Only the last version is kept in wikistream instance output module if delete previous option is enabled
XWIKI-10015: do not use $request.qs as queryString parameter to $doc.getURL
Merge remote-tracking branch 'origin/master'
Revert "XWIKI-10015: do not use $request.qs as queryString parameter to $doc.getURL"

This reverts commit 057a63f68e678b7d755d5bc29a286f31dc564c74.
actually the "fix" is wrong, sorry, revering
XWIKI-10021: No public access to main wiki webhome when public access is not allowed on a subwiki.

* replace $xwiki.checkAccess() by $xwiki.hasAccess()
Revert "XWIKI-10021: No public access to main wiki webhome when public access is not allowed on a subwiki."

This reverts commit d3ebe25dd0349ef92f19ee557c3cc9218e0742d2.
XWIKI-10021: No public access to main wiki webhome when public access is not allowed on a subwiki.

* replace $xwiki.checkAccess() by $xwiki.hasAccess()
[misc] Add license header.
XWIKI-9986: The watchlist livetable is empty when the user subscribes to documents containing double quotes
* Build the JSON in memory and then serialize it.
XWIKI-10015: html escape form action url
Merge remote-tracking branch 'origin/master'
Merge pull request #259 from woshilapin/XWIKI-9970

XWIKI-9970: Inconsistent hiding of the main menu top bar
[misc] Add license header.
XWIKI-9946: The menu of the menu application changes color in edit mode
XWIKI-10022: Instance input WikiStream module should send events even for what is the default from XWiki point of view
XWIKI-9988: Newly created pages with attachments are shown as orphaned and have the language "default"
* Add an API to safely get a locale even when the format is invalid.
XWIKI-9988: Newly created pages with attachments are shown as orphaned and have the language "default"
* Set the document language properly when uploading an attachment to a new document.
[misc] Apply xar:format
XWIKI-9939: Spurious warning "Annotation could not be loaded" on the history page, if annotations are enabled
* Apply new XAR format.