Fix loopjitting

Improve loop arg/ret discovery

Loop-jitting was incorrectly turning local variables into arguments of lifted loop functions when a variable with the same name is used outside of the loop.  This patch improves the overall argument and return value discovery to properly consider the read/write order of variables.  

docstring added