Fix SF bug #474538: Memory (reference) leak in poller.register (Dave Brueck)

Replace some tortuous code that was trying to be clever but forgot to
DECREF the key and value, by more longwinded but obviously correct
code.

(Inspired by but not copying the fix from SF patch #475033.)
2 files changed