Cotangent sums, quantum modular forms and the generalized Riemann hypothesis