Description
I fixed the failure in TestNRTThreads, but in the process tripped an assert because SegmentReader.doCommit isn't sync'd.
So I sync'd it, but I don't think the norms APIs need to be sync'd – we populate norms up front and then never change them. Un-sync'ing them is important so that in the NRT case calling IW.commit doesn't block searches trying to pull norms.
Also some small code refactoring.