Extracted common code between RPC and REST DispatchAsync

Since these two classes share a lot of code but not the same interfaces, I had to extract the concept of "dispatch calls". I think this is not so bad because it reduces the responsibilities of the DispatchAsync.

My next PR will introduce backward-compatibility changes so that my Dispatch refactors do not break existing code. Classes that have been moved will be `@Deprecated`.