Fix up thread safety for some servlet tests