I think that you have a misunderstanding of how the program() destination works.
So, on startup of syslog-ng, the "program" specified in the destination is started and waits for input. This is done so you are not forking processes like mad as logs are coming in. So this explains observation #1.
The subsequent problem caused by the above fact is that $HOST isn't set at the time "program" is invoked.
I found this thread:
http://thread.gmane.org/gmane.comp.syslog-ng/2151/focus=2154Basically, you can create a perl script that is invoked with the program() call, then that script would be made to call rancid with the appropriate parameters grocked from the message.