Two-stage magnetic-field-tuned superconductor–insulator transition in underdoped La2−xSrxCuO4