Initial import (and summary test) for gateway_manager.

(Known to not work.)