Consistently return registered files from Reactor.poll().
Consistently return registered files from Reactor.poll().

Ensures that the registered object is always the one returned from
poll(). Also uses sock rather than socket for socket variables to avoid
possible conflict with the socket module.

schandrika/volttron,schandrika/volttron,schandrika/volttron,schandrika/volttron