Last week’s Twitter hack was a shock to the company. It shouldn’t have been. Scams have been growing more sophisticated for years.