JSON: Use browser native JSON object for json serialization

All modern browsers have native support for JSON serialization [1].

Beside being more performant, this approach seems to fix creating
map instead of array problem, so that an array is translated as array

  "foo": ["bar", "baz"]

and not as a map

  "foo": {"0": "bar", "1": "baz"}

That what JsonObject(json).toString() was doing.

[1] http://caniuse.com/json

Change-Id: I516902273669f58234c5598528f0600ceeab65ec
Fix minor typo in REST API accounts documentation

Change-Id: Icb9fc6ae948468860d9f0d5ac2fff110e183849a
Update the revision of the cookbook plugin

To get the following changes:

- Add Gerrit-PluginName in the BUCK and Maven configs
- Add an example of plugin-owned capability
- Remove unnecessary exceptions from hello command class declaration

Change-Id: I2601b40367bba9e1ecd83adacd3193b9610055b0
Enable updating the full-name of manually created account

When Gerrit runs with LDAP backend, make it possible to
update the full name of manually created account.

Change-Id: I27aafaba263db1794fb808dccb7ccb46b393741f
Install all packaged plugins automatically on auto site init

When Gerrit is deployed in a servlet container and the system property
'gerrit.init' is defined then, besides the automatic site
initialization, also all packaged plugins (under WEB-INF/plugins) will
be installed.

Change-Id: Ia1e50d88ba63e96fc70717f854c87c7409f0c618
Comment Added stream event should be fired even if mail is not sent

If a reviewer adds a comment and unchecks the "and send email" option,
no email is sent, but the "comment-added" event is also not fired on
the events stream.

Fix it so the "comment-added" event is always sent, even if the "send
email" option is disabled.

Change-Id: I31cb740e99614585ce29b3a3bf4c6e2432db9c16
Tidy up documentation of the "Submit (On Behalf Of)" permission

The documentation refers to "SubmitAs", but the permission is actually
named "Submit (On Behalf Of).  Update the documentation to refer to the
correct name.

Move the documentation of the permission to its own section, rather
than only mentioning it inside the "Submit" section.

Change-Id: I9c8deb3506a72ca614e6419157d5b1bed594e176
Merge "Enable updating the full-name of manually created account"
Merge "JSON: Use browser native JSON object for json serialization"
Update the cookbook plugin to the latest revision

- Configure plugin specific list parameters as ProjectConfigEntries
- Changed merged from stable-2.8

Change-Id: Ifbf1222ecbc64a988d7e61bfd891b28c2488eac6
Control which plugins will be auto installed on auto init

Use the system property 'gerrit.install_plugins' to control which
of the packaged plugins will be installed during auto site init
in a servlet container.

When 'gerrit.install_plugins' property is not defined then all packaged
plugins will be installed. If it is present then it is parsed as a
comma separated list of plugin names to install. Defining an empty
string as the property value means that no plugin will be installed.

Change-Id: I52881c9677bc9cc1e51c46c2c2ce4558c79b9a3e
Merge branch 'stable-2.8'

* stable-2.8:
  Comment Added stream event should be fired even if mail is not sent
  Update the revision of the cookbook plugin
  Fix minor typo in REST API accounts documentation

Change-Id: I5a74825e06ef0906b637e30877d6b10d5ec1b00a
Merge "Install all packaged plugins automatically on auto site init"
Merge "Control which plugins will be auto installed on auto init"
Merge "Merge branch 'stable-2.8'"
Use Java 7 style exception handling in IoUtil

- The try-with-resources statement ensures that the URLClassReader
  is always closed, and allows to remove the suppression of Eclipse's
  warning about an unclosed resource.

- Catching multiple exception types in the same block reduces the
  amount of duplicated code.

Change-Id: Iead344269bc0b985b2cd2176f15a764e6a0abb70
Use Java 7 try-with-resources in InitPluginStepsLoader

The try-with-resources statement ensures that the created resources
are always closed.  Thus we can remove the suppression of Eclipse's
warnings about unclosed resources.

Change-Id: Ib20620d35e2b18fd061f6b1ea4d97eb9a00003bc
Don't always close URLClassLoaders

The documentation[1] says:
"Closes this URLClassLoader, so that it can no longer be used to load
new classes or resources that are defined by this loader."

This was incorrectly converted to try-with-resources in [2].

The purpose of this method is to add URLs to the existing ClassLoader
so they can be used in the future, so closing it immediately is
counterproductive, and indeed was causing NoClassDefFoundErrors when
trying to start Gerrit.

[1] http://docs.oracle.com/javase/7/docs/api/java/net/URLClassLoader.html#close()
[2] Iead344269bc0b985b2cd2176f15a764e6a0abb70

Change-Id: I322b665a164e1783ca872ba7dcafdc9ad09e139a
Update gwtjsonrpc to 1.5

Change-Id: Ic1dc85f87afedb2506e8264a0ca4fd5e749a5600
Plugin config: Add support for sections

Add ARRAY ProjectConfigEntry type to handle the whole section:

  [plugin "reviewers"]
    reviewer = john.doe@example.com
    reviewer = jane.doe@example.com
    reviewer = QAGroup

Change-Id: I891ff6efc3423bf84f07ce4dc21853d707402b9d