A tech company is offering unusual leave options, including time off for hangovers and emotional distress over celebrity news, to attract young employees.