Support nested parameters in method invocation

Implement flattening of parameters, so that

    { "here": { "lat": 10, "lng": 20 } }

is sent as

    ?here[lat]=10&here[lng]=20

Improve error handling in async callbacks - exceptions thrown by `callback.onSuccess` are sent to `callback.onError`, so that the application has a chance to handle them.

@Schoonology please review.