Police failed to realise the significance of a series of precursor events leading up to the summer riots and there were gaps in intelligence linked to social media and the dark web, a watchdog has claimed.