I had same symtoms(wifi was lost after some time at all,sometimes had to swich wifi off and on again,sometimes only restart helped).
I tried change my router settings-nothing helped.Finally resetted my Nexus7 to factory settings-and it helped,for now 2 days no problems !