I understand that google gives each page a reference number, one assumes that this enables them to track duplicate content.
Say the bot is indexing an external site and comes accross a link to my site and my external urls have a refrerer in the url for tracking which is removed with a 301. Does Google actually follow the link and pick up the 301 and hence index or log a link to the correct page or just log the url, give the destination page a new id and then a potential duplicate content issue?
There's no duplicate content issue when the target url of a backlink becomes a 301 redirect -- I can tell you that from experience.
The way you are handling those tracking query strings sounds quite well thought out. And as long as there is only one 301 redirect, and not a chain of two or more, then the backlink influence will pass through the redirect to the url without the query string.