Measurement of the Ks->gg branching ratio using a pure Ks beam in the KLOE detector