Threading issue when redefining find_by_session_id

Running under JRuby exposes a problem with the way method redefinition happens with the `find_by_session_id` method.  This patch wraps that with an exclusive block ensuring that one thread doesnt remove a method from underneath another.