Added support of an optional init method for action modules like rsync that need to alter the connection and other inject data before it's established.

This is a potential solution to #3612 that is blocking #3173.