added JSON-RPC2.0 support, modified to allow use by multiple threads(removed global storage), added argument passing, other: interface + general tidy-up