Abstract out redirect method

Adds a new switch case in do_transaction for the 'redirect'
communication_type.  The pre_process_$transaction function
is executed, and validation results returned to the calling
function before mediawiki performs the redirect.

A new hook is defined, 'GatewayHandoff', for actions such as
inserting into the limbo queue.  Nothing is done here for
paypal.

Gateway such as 'url' and 'communication_type' can now be
overridden per transaction type.

The new 'buildRequestParams' function returns api parameters
as a plain array, which will be useful for generating signatures
and GET query strings.

Legacy code declaring const COMMUNICATION_TYPE will still work

Change-Id: Ifbfe46d87f1bf3808fa79017f74f04e5de3b0f9d
Merge "Abstract out redirect method"