Improve gateway generator

This brings the generated code and tests into better alignment with
current best practice.
Add maxiPago gateway

http://www.maxipago.com/

Closes #996.