More ToUserDevice nits

This fixes a pair of races and a memory leak, all related to having a ToUserDevice/FromUserDevice open when the /click/config is reloaded.
Agreed. I can move it to somewhere in include/click/ but it seemed a little too small to give it its own header. The destructor also isn't really generic, so any sub-class doing the same work of a more generic template would be almost as big inline as the template itself.