Reimplement document click listener hookup

I'm trying to use scombobox in a situation where ajax-style communication with the server deletes a control that I've transformed from a regular select into an scombobox, then adds a new select and transforms this into an scombobox. My problem was, when I clicked away from the first instance (e.g. clicked elsewhere on the window) while it was dropped down the scombobox closed up correctly, but once I'd destroyed this instance and created a new one a click-away no longer closed up the new list.

I devised the attached change, which seems to solve it for me. I think it's back compatible, but I'm not set up to do proper regression testing. Please review it, and merge it if you think it won't cause other problems.