Cache created pollitems

The method register and unregister set a dirty flag when they've been
called. The poll method will recreate the pollitems when the dirty flag
is set.