Ab initio study of guanine tautomers in the S0 and D0 states