Electronic structure, defect properties, and hydrogen storage capacity of 2H-WS2: A first-principles study