Afghan president signs retirement of 164 generals