Unemployment insurance with endogenous search intensity and precautionary saving