Possible fix for issue #9 : Track the number of key registrations in the NioManager so that we don't have to call selector.keys().size() from a different thread than the one that 'owns' the selector.