Use JSON.parse() instead of eval() to deserialize rpc callback payload #11289

IE9 is currently leaking memory on every RPC call you make. The root
cause is that eval() on IE9 is designed to keep everyting evaled in
memory until the browser session dies (see
http://support.microsoft.com/kb/2572253).

To work around this issue this patch instead of using eval() on the
RPC callback payload uses JSON.parse which does not have these problems.
Since JSON
does not support the special values NaN, Infinity and -Infinity they are
now
converted into strings and later converted back with Number(x) on the
client side.

The default RPC version still remains as 7 and this patch introduces a
new system variable "gwt.rpc.version" which can be set to 8 to resolve
the memory leak. Special cases where hacks have been applied to
circumvent browser limitations (string literal size limitation, array
size limitation) will still be applied in version 8 and will still be
evaled instead of JSON.parsed on the client side.

Change-Id: I3c116299771dcaac3f1dcd0cd0a6f71e0c693893