DNA-binding mechanism and evolution of replication protein A