Search for D0 →γγ and improved measurement of the branching fraction for D0 →π0π0