Fix a lot of issues from review, most notably removing some not that useful tests, and switch from an exposed double-check lock strategy using a single mutex, to a read/write lock double-check.