From refusing to doff hats in court to resisting hat-snatching highway robbers, England's relationship with hats goes far deeper than fashion, new research shows.