Vacuum instability, cosmology and constraints on particle masses in the Weinberg-Salam model